WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
ISSUE TYPE

Bug Report

ANSIBLE VERSION

ansible-playbook --version
ansible-playbook 2.0.0.2
config file = /var/lib/jenkins/jobs/XXX/workspace/ansible.cfg
configured module search path = modules/ansible

CONFIGURATION

Nothing special

OS / ENVIRONMENT

Linux

Replicable on Ubuntu and CentOS

SUMMARY

Following line works as expected

when: job_status.json.status == 'FAILED' or job_status.json.status == 'PASSED'

Wrapping same code with inline array:

when: job_status.json.status in ['FAILED','PASSED']

Triggers error:

["FAILED"' failed. The error was: template error while templating string: unexpected '}', expected ']'. String: {% if job_status.json.status in ["FAILED" %} True {% else %} False {% endif %}

STEPS TO REPRODUCE

EXPECTED RESULTS

Syntax for 'in' operator should work in when statement with inline array definition.

Most probably inline array is interpreted differently, most probably can be fixed by enforcing interpretation of [] when preceded by in operator.

ACTUAL RESULTS

Issue 2:
Issue Type:

Bug Report

Ansible Version:

1.7.2

Environment:

Centos 6

Summary:

When using git module with recursive=no the option is used on initial clone but ignore on subsequent checkout if new commits are available

Steps To Reproduce:

use a task like :

name: sync front with prepub branch (www) git: repo="{{local_git}}" dest={{git_root}} version={{git_branch_name}} recursive=no

run the task a first time,

add commits to your branch,

run a second time

Expected Results:

submodule are always ignored

Actual Results:

submodule aren't ignore after initial clone if they are new commits available
Issue 1:
Challenge adjusting-the-padding-of-an-element has an issue.

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}

.yellow-box {
background-color: yellow;
padding: 10px;
}

.red-box {
background-color: red;
padding: 10px;
}

.green-box {
background-color: green;
padding: 10px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

```
The challenge says "Change the padding of your green box to match that of your red box."
Initially the padding of the red box is 20 px and the padding of the green box is 10 px.
So, we need to change the padding of the green box to 20 px to pass the challenge.

But when we do so,the Run Tests is not successful. Below the challenge it says "Your green-box class should give elements 20px of padding." . Even though I have changed the padding of green box class to 20px it is still passing it

![screenshot 24](https://cloud.githubusercontent.com/assets/13553103/18403367/c365bfba-76fd-11e6-9896-9025d4d5a491.png)

Issue 2:
Issue Description

I am working on this challenge (Use Clockwise Notation to Specify the Padding of an Element) but I can't seem to get past it, is it my code?

Browser Information

Browser Name, Version: Mozilla/5.0

Operating System: Macintosh; Intel Mac OS X 10.11; rv:48.0

Your Code

<style>
.injected-text {
margin-bottom: -25px;
text-align: center;
}

.box {
border-style: solid;
border-color: black;
border-width: 5px;
text-align: center;
}

.yellow-box {
background-color: yellow;
padding: 20px 40px 20px 40px;
}

.red-box {
background-color: red;
padding: 20px 40px 20px 40px;
}

.green-box {
background-color: green;
padding: 40px 20px 20px 40px;
}
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
<h5 class="box red-box">padding</h5>
<h5 class="box green-box">padding</h5>
</div>

Screenshot
Issue 1:
Environment

Windows build number: windows 10 1909
PowerToys version: 0.18
*PrtScn key is used for new official screenshot app

Steps to reproduce

active the powertoys window,then use PrtScn key in the keyboard

Expected behavior

screenshot bar should be shown like this ↓

Actual behavior

screenshot bar didn't work

Issue 2:
Environment

Windows build number: 10.0.18363
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Open PowerToys Run interface

Press PrtScreen key (for me FN+END on german keyboard layout)

Expected behavior

Screenshot will be captured.

Actual behavior

Nothing happens.
Issue 1:
This is more of a feature request...

When viewing a markdown file in split panes with one side being the raw markdown and the other being the HTML preview, I'd like to be able to have the two panes stay in sync as I scroll one or the other. For example, if I scroll down in the raw pane, I'd like the preview pane to scroll down as well so the markdown and preview stay in sync with each other. This is a feature found in MarkdownPad, my current/previous markdown editor, that I'd like to see in VS Code as well.

Thanks!

Issue 2:
VSCode Version:0.10.14 code-insiders

OS Version:Windows 10

Steps to Reproduce:

Open a markdown preview to the side of markdown source

Scroll source file

It would be nice to have a way to lock the preview and scroll at the same time. Especially nice for longer markdown files.

This came in from an internal MS writer using VS Code for Markdown.
Issue 1:
So we can do something like this:

COUCHDB_URL = 'https://mybigusername:myenourmouspassword@mycouchdb.provider.com/databasename/'

s = requests.Session(url_prefix=COUCHDB_URL)
r = s.get('/_all_docs', params=dict(include_docs=True))
r = s.get('/some_document_id')

The example uses the CouchDB API and it would almost entirely prevent the need for API wrappers like this (see it storing the url prefix right here). But extensive usage of any REST API would benefit from this.

Issue 2:
Is it possible to add an optional base url attribute to the Session object ?

For example;

auth = ('user', 'pass')
with requests.session(url='http://api.twitter.com', auth=auth) as s:
resp = s.get('/1/statuses/home_timeline.json')
Issue 1:
Summary of the new feature/enhancement

I have eight equally sized zones but if I only have three open windows it would be better to connect to neighbouring zones and enlarge my windows.

Proposed technical implementation details (optional)

By pressing the Shift+CTRL key and holding the window between two zones it should snap over both zones.

Issue 2:
Environment

Windows build number: Microsoft Windows [Version 10.0.19041.388]
PowerToys version: Release v0.19.2

Steps to reproduce

remap ctrl+v to windows + v then try to paste something and select it in the dropdown the dropdown will close and nothing will happen

Expected behavior

should paste the selected item from the dropdown

Actual behavior

Wont paste anything
Issue 1:
If i am setting image to imageview from path image view is automatically zooming, can you tell me why this happen? My code is

Glide.clear(imageView);
Glide.with(mContext)
.load(path)
.asBitmap()
// .animate(R.anim.activity_fade_in)
// .dontAnimate()
// .centerCrop()
.signature(new StringSignature(noteGroup.getLastModifiedDate().toString()))
.placeholder(bitmapDrawable)
.skipMemoryCache(false)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.override(width, height)

Issue 2:
Glide Version/Integration library (if any): 3.5.2

Device/Android Version: S4/4.4

Issue details/Repro steps: Load a different sized thumbnail and image, or placeholder and image and note the result:

Glide load line:

class Delay extends UnitTransformation {
private final int sleepTime;
public Delay(int sleepTime) { this.sleepTime = sleepTime; }
@Override public Resource transform(Resource resource, int outWidth, int outHeight) {
try { Thread.sleep(sleepTime); } catch (InterruptedException ex) {}
return super.transform(resource, outWidth, outHeight);
}
}

@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ImageView image = new ImageView(this);
setContentView(image);

// Saved as R.drawable.placeholder
String placeholder = "http://placehold.it/300x500/eedddd.png&text=PLACEHOLDER";
// Square image
String thumb = "http://placehold.it/300x300/eeeedd.png&text=THUMB";
// Wide image
final String full = "http://placehold.it/300x100/eedddd.png&text=FULL";
// Prepared request with unimportant clutter
final DrawableRequestBuilder<String> req = Glide
.with(this)
.fromString()
.diskCacheStrategy(DiskCacheStrategy.SOURCE) // disable network delay for demo
.skipMemoryCache(true) // make sure transform runs for demo
.crossFade(2000) // default, just stretch time for noticability
;

req.clone()
.thumbnail(req.clone()
.transform(new Delay(500)) // wait a little
.load(thumb)
)
.transform(new Delay(1000)) // wait before going from thumbnail to image
//.dontAnimate() // solves the problem
.load(full)
.into(image);

image.setOnClickListener(new OnClickListener() {
@Override public void onClick(View v) {
req.clone()
.load(full)
.placeholder(R.drawable.placeholder)
.transform(new Delay(1000))
//.animate(R.anim.abc_fade_in) // also solves the problem
.into(image);
}
});

By removing all the delaying parts, the end result is better, but the now the thumbnail is messed up:
Issue 1:
Hello everyone,

I have experienced a very unusual bug that I never saw before. When I run this codes, I got logout from MacOS and return to login page!

import matplotlib.pyplot as plt
from astropy.visualization import astropy_mpl_style
from astropy.utils.data import get_pkg_data_filename
from astropy.io import fits
from astropy.wcs import WCS
hdu = fits.open('file.fits')[0]
wcs = WCS(hdu.header)

plt.subplot(projection=wcs)
plt.figure()
plt.imshow(hdu.data, cmap='gray')
plt.colorbar()
plt.show()

This bugs only happens when I keep

plt.show()

I also saw this bugs today by installing DS9 8.0.1 Aqua port (not X11 port). When I tried to open DS9, it just logout from my client and return to login page.

I guess it's far beyond matplotlib, Maybe comes from X11?

Is there any solution?

Thanks!

Issue 2:
Bug report

Bug summary

Trying to view a plot made with Python 3.7, Spyder, and IPython with the Tkinter backend causes a crash and the macOS Mojave login screen appears.

Code for reproduction

Any kind of plot will cause the problem.

import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10)
y = 2 * x
plt.plot(x, y)

Actual outcome

Crash and the Mojave 10.14.6 login screen appears.

The problem started occurring after the update to Mojave 10.14.6. When I create a plot and click on the plot window icon on the dock, the screen goes black for a second and the macOS login screen appears. After I log in, the windows of Anaconda Navigator and Spyder are gone and their icons are no longer present on the Dock. Activity Monitor however indicates that python is still running.

I have reproduced this behavior a few times. Switching the IPython backend to Qt5 solved the problem.

Expected outcome

A plot.

Matplotlib version

Operating system: MacOS Mojave 10.14.6 (Darwin 18.7.0)

Matplotlib version: 3.1.0

Matplotlib backend (print(matplotlib.get_backend())): Tkinter

Python version: 3.7.3

Jupyter version (if applicable): n/a

Other libraries: Spyder 3.3.6, IPython 7.6.1

Running the stock Anaconda Distribution 2019.07.
Issue 1:
System info

Playwright Version: v1.35.1

Operating System: Windows 11

Browser: None (Unit testing)

Other info:

Source code

Test file (self-contained)

import { expect, test } from "@playwright/test";

test('Playwright promise rejection with finally', async () => {
let p = new Promise((resolve, reject) => {
reject('failed');
});

p.finally(() => {
console.log('finally');
});

let has_failed = false;
try {
await p;
} catch (e) {
has_failed = true;
}
expect(has_failed).toStrictEqual(true);
});

test('Playwright promise rejection without finally', async () => {
let p = new Promise((resolve, reject) => {
reject('failed');
});

let has_failed = false;
try {
await p;
} catch (e) {
has_failed = true;
}
expect(has_failed).toStrictEqual(true);
});

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
testDir: './tests',
fullyParallel: true,
reporter: 'html',
use: {
trace: 'on-first-retry'
},

timeout: 5 * 60 * 1000,

expect: {
timeout: 30000,
},

projects: [
{
name: 'unit_tests',
testMatch: /.*\.unit\.ts/
},
],
});

Steps

Run the first test : it fails

Run the second test : it works fine

Expected

Both should work the same

Issue 2:
System info

Playwright Version: 1.32.2 (experimental-ct-react)

Operating System: macOS Ventura 13.0

Browser: All

Other info: playwright uses vite@2.8.6 to build for production (shown when running cmd in terminal). For the reproduction I added vite to peerDependencies using version 2.8.6 which is causing the error. This is not exactly how it is in the package of the repository where the error appeared first. There, playwright just uses another vite version that is used in some other package of the monorepo and remains using that version even if I update vite in that package and the particular version number 2.8.6 only remains appearing in the pnpm-lock.yaml for the whole monorepo. When I run pnpm --filter "@*/components" test:units so all packages use 4.2.1 playwright then also uses 4.2.1 and then everything works as expected

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

Github Reproduction

Steps

Using the reproduction from github

pnpm i

pnpm --filter "@ct/components" test:units

Using your own repro

Add @playwright/experimental-ct-react17

Add "vite": "^2.8.6" to peerDependencies

Run pnpm i

Run test via pnpm test-ct

Playwright will show vite v2.8.6 building for production…

Test fails with Invalid option in transform() call: "jsxSideEffects".

Expected

All tests are running through

or playwright exits with an error informing me that the vite version is not supported and shows min supported vite version

or playwright just informs me that it is using another vite version to run the tests instead of the referenced version

Actual

Test run fails with error Invalid option in transform() call: "jsxSideEffects".
Issue 1:
So I'm using a custom usePrevious hook that returns the 'previous value' which is as far as I know pretty common practice. It leverages a ref inside the hook. When I declare a ref inside a functional component and use this in a useEffect, react-hooks/exhaustive-deps does not require me to add the ref to the dependencies list of a useEffect, but using usePrevious does.

React version: "react": "^17.0.1",

Steps To Reproduce

Link to code example: https://codepen.io/spassvogel/pen/JjbXKJL?editors=1111

const usePrevious = (value) => {
const ref = React.useRef();
React.useEffect(() => {
ref.current = value;
}, [value]);
return ref.current;
};

const TestComponent = () => {
const [state, setState] = React.useState(0);
const previousState = usePrevious(state)

React.useEffect(() => {
console.log('current state', state)
console.log('previous state', previousState)

}, [state]); // ESLINT COMPLAINS
return null;
};

The current behavior

react-hooks/exhaustive-deps complains about the dependency list of useEffect is missing previousState.

The expected behavior

react-hooks/exhaustive-deps realizes that usePrevious is leveraging useRef and thus doesn't need its return value in the dependency list.

A workaround would be to duplicate the code of usePrevious in every component, then react-hooks/exhaustive-deps does not complain. but yeah...

Issue 2:
Describe what you were doing when the bug occurred:

1.

2.

3.

Please do not remove the text below this line

DevTools version: 4.2.1-3816ae7c3

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157108

at Map.forEach ()

at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157054)

at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:157577)

at vl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:314907)

at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59907)

at jl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107381)

at Lc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92715)

at Pc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:92640)

at wc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:89544)

Component stack: in vl

in div

in div

in div

in wo

in Unknown

in n

in Unknown

in div

in div

in Li

in $e

in dn

in Ca

in Pc
Issue 1:
Flask will send 400 "Bad Request Version" if Flask send 401 or 403 response to Client without closing the http connection.

Client POST text/xml message without "Basic Authorization"

Server response 401, but don't send "HTTP: close"

Client POST text/xml message again with "Basic Authorization"

Server response 400 "Bad Request Version"

I wish Flask can handle the second POST correctly, And I have tested using another server, it works well.

Please the capture for details. And the partial code is as following(full code link:https://github.com/ballzb/pyacs )

@basic_auth.verify_password
def verify_password(username, password):
#app.logger.error(f"username={username}, password={password}")
if username==config['local']['username'] and password==config['local']['password']:
return username
else:
g.current_user = username
return False #username or password error

@basic_auth.error_handler
def auth_error(status_code):
#app.logger.error(f"status_code={status_code}, username={g.current_user}")
if status_code == 401:
if g.current_user:
return cwmp.make_403_response()
else:
return cwmp.make_401_response(config['local']['authentication'])
# return "Access Denied", status_code

@app.route('/acs', methods=['GET', 'POST'])
@multi_auth.login_required
def acs():
""" main tr069/acs entry point """
if request.method == 'GET':
return DESCRIPTION

if request.method != 'POST':
return 'There is nothing to show'

#app.logger.error(request.headers)

# POST requests
if request.content_type.find('text/xml')==-1:
app.logger.error(f"request.content_type={request.content_type}")
return 'Wrong content type'

result = cwmp.handle_request(request)
if result:
return result
else:
return DESCRIPTION

Environment:

Python version: 3.10

Flask version: 2.1.1

400.zip

Issue 2:
With the following example:

from flask import Flask

app = Flask(__name__)

@app.route('/', methods=['POST'])
def hello_world():
return 'Hello World!'

if __name__ == '__main__':
app.run()

When you set the request body to {} with Postman or any HTTP clients, the first request will return 200, while the second request will return a 405 error response. The log shows the request method is {}POST:

"{}POST / HTTP/1.1" 405

Notice the request body became the part of the request method.
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

New lines in arguments supplied to npx are replaced with \n when reading via process.argv

So "

" becomes "\n". This behaviour is not reproducible if running a bin script directly in the command line (./bin.js "$ARG" and not npx package-with-bin "$ARG")

Expected Behavior

New lines in process.argv args to be represented as "

"

Steps To Reproduce

bin.js:

#!/usr/bin/env node
const value = process.argv[2];
console.log(value);

package.json:

"bin" : {
"package-with-bin": "./bin.js"
},

npm publish

create a file with multiple lines

npx package-with-bin "$(cat multilinefile)"

Environment

OS: macOS Big Sur 11.3.1

Node: v15.12.0

npm: 7.8.0

Issue 2:
Brief

npx and npm exec pass ESCAPED multiline string, instead of original string.

Is there an existing issue for this?

I have searched the existing issues

Current Behavior

$ npx cowsay -- "$(node --version; npm --version)"
__________________
< v14.16.0\n7.15.0 >
------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Expected Behavior

cowsay "$(node --version; npm --version)"
__________
/ v14.16.0 \
\ 7.15.0 /
----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Steps To Reproduce

docker run -it node /bin/bash

npx cowsay "$(node --version; npm --version)"

Environment

Docker: node

OS: Debian GNU/Linux 9 (stretch)

Node: v15.14.0 - v17.4.0

npm: 7.7.6 - 8.3.1
Issue 1:
I am trying to

import 'bootstrap/dist/css/bootstrap.min.css';

in my next.js project but I get following error

Module parse failed: Unexpected token (6:3) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file

I have next.config.js file in root directory of project. It has this configuration

// next.config.js
const withCSS = require('@zeit/next-css');

module.exports = withCSS({
cssLoaderOptions: {
url: false
}
});

I followed this comment which apparentlyworks but not for me. Any ideas why?

Issue 2:
Bug report

Describe the bug

Importing a stylesheet from a package is not possible in a page, because next throws with this error:

Global CSS cannot be imported from files other than your Custom <App>. Please move all global CSS imports to pages/_app.tsx.
Read more: https://err.sh/next.js/css-global

While I understand where this stems from, it makes code-splitting impossible. If I import a component from a component library, I need to import the CSS as well. There might be libraries that don't correctly scope their selectors, but that shouldn't stop me from overwriting this warning. CSS that is imported from a library isn't inherently "global".

To Reproduce

import "my-library/index.css"

yarn dev

I get the error from above

Expected behavior

The file should be imported.

I see these possible solutions:

Global flag in next.config.js

Comment annotation on import

Warn instead of completely blocking it

Check if the CSS only contains scoped selectors

Additional context

There have been previous discussions about this.

From the blog

Since stylesheets are global by nature, they must be imported in the Custom component. This is necessary to avoid class name and ordering conflicts for global styles.

I disagree with this statement, the reasoning being that an external library can use CSS modules and package them as a CSS file to import. Which is perfectly valid and common practice and does not have side effects.

#10059

This issue got closed because the global import in _app is the correct choice there.

This comment describes the exact problem, but there hasn't been any response, as the issue is closed. The comment got a lot of positive reactions though, so I suppose I'm not the only one with this problem.

#10975

Seems to be unrelated.

#9830

Might be related, but I'm not sure.

My use case

I write long articles with a lot of custom artwork and interactive illustrations. Articles use private npm packages with react components that render SVG with quite a bit of CSS. These packages use CSS modules and export an index.js and index.css. Adding all the CSS files to _app causes all the CSS to be loaded, even if people are on the home page, the contact form, or any other article, even though it's 100% unused. It also goes against having the file system take care of your pages because almost every page corresponds to a CSS import in _app.