instance_id
stringlengths
10
57
file_changes
listlengths
1
15
repo
stringlengths
7
53
base_commit
stringlengths
40
40
problem_statement
stringlengths
11
52.5k
patch
stringlengths
251
7.06M
andytzeng__pyxurls-3
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "xurls/express.py:relaxed_ex...
andytzeng/pyxurls
029fdeeaff1dd9fd95402c19925d2982fafb38ab
require ASCII TLDs to be followed by a word break again A commit from the author has fixed the word break for false positively parsing text as url. https://github.com/mvdan/xurls/commit/cee2e13ff09deef34fcfa2b932bc99766a0b7b24 related issue https://github.com/mvdan/xurls/issues/49
diff --git a/.travis.yml b/.travis.yml index a402fc7..9d06a47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_install: - sudo apt-get update - sudo apt-get install libre2-dev pybind11-dev install: - - pip install "google-re2==0.0.5" ./ + - pip install "google-re2" ./ script: - pytest dep...
anentropic__python-waterloo-6
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "setup.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "waterloo/annotator/__init__...
anentropic/python-waterloo
7b381d8d08695e1424d35514aa6b7ce1afcae5a8
TODO: remove types from docstring The point of having type annotations rather than a docstring is you can run `mypy` as a build-step and it will fail if the annotations are out of sync with the code. This implies that when adding type annotations we should also remove them from the docstring. If you are using you...
diff --git a/.travis.yml b/.travis.yml index 5f81eeb..ae1a7f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ dist: xenial # --- language: python python: - - "3.6" - "3.7" - "3.8" install: @@ -14,5 +13,5 @@ install: - pip install . # (note: pytest already available in travis, breaks if we in...
angr__claripy-310
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "claripy/backends/backend_z3.py:_add_memory_pressure", "claripy/backends/backend_z3.py:BackendZ3.__init__", "claripy/backends/backend_z3.py:BackendZ3._simplification_cache_key", "...
angr/claripy
59f1a0b87be4434871242c1fb04b0bbcf70ebacf
Calling solver max twice changes the result. ### Description Calling `s.max(x)` twice in a row yields different results. I imagine this might be due to caching, as I can see the first invocation of `s.max(x)` calls out to `z3`'s backend, where as the second one does not. This invocation also adds extra constraints t...
diff --git a/claripy/backends/backend_z3.py b/claripy/backends/backend_z3.py index 6a133e05..0ace4228 100644 --- a/claripy/backends/backend_z3.py +++ b/claripy/backends/backend_z3.py @@ -65,7 +65,7 @@ def _add_memory_pressure(p): This is not a problem for CPython since its GC is based on reference counting. "...
angr__claripy-436
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "claripy/ast/base.py:Base._first_backend", "claripy/ast/base.py:Base.concrete_value", "claripy/ast/base.py:Base.cv", "claripy/ast/base.py:Base.v", "claripy/ast/base.py:Bas...
angr/claripy
ca2b8b23a301f90c3bbb2a7f336b66653e8ada89
Base.replace cannot work on Bool ### Description ```python import claripy b = claripy.BoolS("b") expr = claripy.If(b, claripy.BVV(2, 32), claripy.BVV(3, 32)) new_expr = expr.replace(b, claripy.BoolV(True)) ``` Error: ``` @staticmethod 41 def _check_replaceability(old, new): ---> 42 if ol...
diff --git a/claripy/ast/base.py b/claripy/ast/base.py index 36a1ef3a..f16ddc57 100644 --- a/claripy/ast/base.py +++ b/claripy/ast/base.py @@ -525,12 +525,6 @@ class Base: # Collapsing and simplification # - # def _models_for(self, backend): - # for a in self.args: - # backend.convert_exp...
angr__claripy-450
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "claripy/ast/bool.py:ite_dict" ], "edited_modules": [ "claripy/ast/bool.py:ite_dict" ] }, "file": "claripy/ast/bool.py" } ]
angr/claripy
6bfdb825ce184d45e21693afb219a82e98394b00
note to self: ite_dict is misbalanced (need: split_val = keys[(len(keys)-1) // 2]) ### Description a ### Steps to reproduce the bug a ### Environment a ### Additional context a
diff --git a/claripy/ast/bool.py b/claripy/ast/bool.py index 0e9ab8a0..a3ba13e6 100644 --- a/claripy/ast/bool.py +++ b/claripy/ast/bool.py @@ -205,7 +205,7 @@ def ite_dict(i, d, default): # Find the median: keys = list(d.keys()) keys.sort() - split_val = keys[len(keys) // 2] + split_val = keys[(len...
angr__claripy-603
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "claripy/backends/backend_z3.py:BackendZ3._abstract_internal" ], "edited_modules": [ "claripy/backends/backend_z3.py:BackendZ3" ] }, "file": "claripy/backends/backend_z3...
angr/claripy
19da57b37f8ae2a6021c3e898e7d7390c84571e6
New versions of claripy cannot convert z3.SignExt properly and introduce BVNone ### Description ``` >>> import claripy >>> claripy.backends.z3._abstract(z3.SignExt(32,z3.BitVec('x',32))) <BVNone SignExt(32, x)> >>> claripy.__version__ '9.2.143' ``` vs. ``` >>> claripy.backends.z3._abstract(z3.SignExt(32,z3.BitVec('x',...
diff --git a/claripy/backends/backend_z3.py b/claripy/backends/backend_z3.py index 3eb193bc..8f66cb96 100644 --- a/claripy/backends/backend_z3.py +++ b/claripy/backends/backend_z3.py @@ -546,6 +546,12 @@ class BackendZ3(Backend): if op_name == "fpToSBV": bv_size = z3.Z3_get_bv_sort_size(ctx, z3_so...
ankur-gupta__flicker-6
[ { "changes": { "added_entities": [ "flicker/dataframe.py:FlickerDataFrame.union" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "flicker/dataframe.py:FlickerDataFrame" ] }, "file": "flicker/dataframe.py" }, { "changes": ...
ankur-gupta/flicker
f7ca539092e9e14104d8f74eef03c65667305b8f
Add docstrings and tests for `rows_with_max` and `rows_with_min`
diff --git a/flicker/dataframe.py b/flicker/dataframe.py index 3745256..994db3b 100644 --- a/flicker/dataframe.py +++ b/flicker/dataframe.py @@ -1142,19 +1142,57 @@ class FlickerDataFrame(object): return df.agg({name: 'min'}).collect()[0][0] def rows_with_max(self, name, ignore_nan=True): - # Not...
anntzer__defopt-100
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "lib/defopt.py:_populate_parser" ], "edited_modules": [ "lib/defopt.py:_populate_parser" ] }, "file": "lib/defopt.py" } ]
anntzer/defopt
18e705775e85d2eac64977f363b6b494307eccc7
Feature Request: Make Optional[bool] still act as a flag Consider the code below. I'd like to have the argument `skip` still act as a normal boolean flag and then program would only get None if neither `--skip` nor `--no-skip` is provided. The idea here is that if the user explicitly sets this flag, then it should be...
diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 202d75b..27b518a 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -1,6 +1,10 @@ Changelog ========= +next +---- +* Fixed `typing.Optional[bool]` to still be treated as a flag. + 6.2.0 (2021-11-24) ------------------ * B...
anntzer__defopt-109
[ { "changes": { "added_entities": [ "lib/defopt.py:Visitor.visit_target" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "lib/defopt.py:Visitor" ] }, "file": "lib/defopt.py" }, { "changes": { "added_entities": null, ...
anntzer/defopt
d861348af3771bfe165be4406dc33de7f064ef08
Support URLs in docstring Defopt seems to raise an error if you have a URL (both plain text URLs and [RST-formatted URLs](https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#links-to-external-web-pages)) in your docstring. I can submit a PR to fix this.
diff --git a/lib/defopt.py b/lib/defopt.py index bb2422f..72114fc 100644 --- a/lib/defopt.py +++ b/lib/defopt.py @@ -754,6 +754,18 @@ def _parse_docstring(doc): depart_Text = _do_nothing + visit_reference = depart_reference = _do_nothing + + def visit_target(self, node): + if self....
anntzer__defopt-116
[ { "changes": { "added_entities": [ "lib/defopt.py:_is_container", "lib/defopt.py:_is_union_type", "lib/defopt.py:_is_optional_list_like" ], "added_modules": [ "lib/defopt.py:_is_container", "lib/defopt.py:_is_union_type", "lib/defopt.py:_is_optio...
anntzer/defopt
34b8d39b72af2fbc149ade13a0e9c3fd8a8bfba6
Should `Optional[Tuple[type1]]` be supported I noticed that while `Optional[SomeContainer[type1]]` is supported for most of the containers defopt supports (i.e., List, Sequence, Collection, Iterable), it is not supported for Tuple. I would expect `Optional[Tuple[type1]]` to behave similarly to other containers, in that...
diff --git a/lib/defopt.py b/lib/defopt.py index 921a182..a1c2884 100644 --- a/lib/defopt.py +++ b/lib/defopt.py @@ -71,6 +71,12 @@ __all__ = ['run', 'signature', 'bind', 'bind_known'] _PARAM_TYPES = ['param', 'parameter', 'arg', 'argument', 'key', 'keyword'] _TYPE_NAMES = ['type', 'kwtype'] +_LIST_TYPES = [ + l...
ansible__ansible-builder-335
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_builder/cli.py:add_container_options" ], "edited_modules": [ "ansible_builder/cli.py:add_container_options" ] }, "file": "ansible_builder/cli.py" }, { "...
ansible/ansible-builder
3bfa542b9806fab1d977162f7e9efd9c3b06589c
RFE: Add no-cache option to the builder When doing some build automatically with the same name it would be nice to have the no-cache option.
diff --git a/ansible_builder/cli.py b/ansible_builder/cli.py index 1d647e2..5e67cea 100644 --- a/ansible_builder/cli.py +++ b/ansible_builder/cli.py @@ -124,6 +124,12 @@ def add_container_options(parser): 'Internally ansible-builder makes use of {0}.'.format( ', '.join(constants.build_arg_de...
ansible__ansible-builder-336
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_builder/requirements.py:sanitize_requirements" ], "edited_modules": [ "ansible_builder/requirements.py:sanitize_requirements" ] }, "file": "ansible_builder/requ...
ansible/ansible-builder
3e4a25e22f6ffdc4385b3ee4ba9e79b2efe5aa5c
ansible-builder introspect --sanitize removes yamllint and ansible-lint from requirements.txt I want yamllint and ansible-lint to be available inside of my Execution Environment, so I added it to my requirements.txt file, but when the builder step runs `ansible-builder introspect --sanitize...` it strips this out from ...
diff --git a/ansible_builder/cli.py b/ansible_builder/cli.py index 5e67cea..349fe7b 100644 --- a/ansible_builder/cli.py +++ b/ansible_builder/cli.py @@ -163,6 +163,7 @@ def add_container_options(parser): help=('Sanitize and de-duplicate requirements. ' ...
ansible__ansible-builder-337
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_builder/cli.py:add_container_options", "ansible_builder/cli.py:parse_args" ], "edited_modules": [ "ansible_builder/cli.py:add_container_options", "ansible_bui...
ansible/ansible-builder
51d0cb3424560586ee99781ffa9a4ddc4cdae806
feature request: multiple tags on build Currently specifying multiple tags like so: `ansible-builder build -t tag1 -t tag2`, results in `docker build -f context/Dockerfile -t tag2 context` The underlying tools support multiple tags so it would be nice if specifying multiple tags with `ansible-builder` was possible a...
diff --git a/ansible_builder/cli.py b/ansible_builder/cli.py index 349fe7b..4ea6dfb 100644 --- a/ansible_builder/cli.py +++ b/ansible_builder/cli.py @@ -104,10 +104,15 @@ def add_container_options(parser): ) ) + # Because of the way argparse works, if we specify the default here, it would + # alwa...
ansible__ansible-builder-359
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_builder/requirements.py:sanitize_requirements" ], "edited_modules": [ "ansible_builder/requirements.py:sanitize_requirements" ] }, "file": "ansible_builder/requ...
ansible/ansible-builder
bad5884b6da9757b9ccd8ddfdcd2dc27389f91d9
ansible-builder failed to build EE for cisco.aci because of Double requirement given ### Issue ansible-builder returned the following error when trying to build EE for AAP 2.1 with cisco.aci collection ~~~ + pip3 install --cache-dir=/output/wheels -r /tmp/src/requirements.txt WARNING: Running pip install with roo...
diff --git a/ansible_builder/requirements.py b/ansible_builder/requirements.py index 2c85317..5b99a76 100644 --- a/ansible_builder/requirements.py +++ b/ansible_builder/requirements.py @@ -1,5 +1,6 @@ import logging import requirements +from pkg_resources import safe_name logger = logging.getLogger(__name__) @@ ...
ansible__ansible-builder-466
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_builder/containerfile.py:Containerfile._prepare_ansible_config_file", "ansible_builder/containerfile.py:Containerfile._prepare_build_context", "ansible_builder/containerfile.py:C...
ansible/ansible-builder
ac0d99fb1987525eee4e37afc7fea2acb0d5d575
Fix `hadolint` issues in the template. I `create` my context and `build` the image from a `kaniko` container, but my pipeline runs `hadolint` before building... Then I've noticed a few issues with the `Dockefile` generated... ```Dockerfile ARG EE_BASE_IMAGE=**** ARG EE_BUILDER_IMAGE=**** FROM $EE_BASE_IMAGE as ...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9756a45..e9f3fc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - id: has_secrets if: ${{ env.secret_user != '' && env.secret_pass != '' }} run: | - echo "::set-output n...
ansible__ansible-builder-517
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_builder/cli.py:BuildArgAction.__call__" ], "edited_modules": [ "src/ansible_builder/cli.py:BuildArgAction" ] }, "file": "src/ansible_builder/cli.py" } ]
ansible/ansible-builder
9a221ca5328468e154c2d8e45fdca977cf27ddff
empty `build-arg` passthru is broken The custom `--build-arg` splitter logic in the builder CLI doesn't properly preserve args with an empty value; they are conflated with args without a value. eg: ``` ansible-builder build --build-arg PKGMGR_PRESERVE_CACHE= ``` should force an empty value, but since the traili...
diff --git a/docs/usage.rst b/docs/usage.rst index 5033b02..e9f37c6 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -142,6 +142,12 @@ By default, the Containerfile / Dockerfile outputted by Ansible Builder contains $ ansible-builder build --build-arg FOO=bar +To use different build arguments, you can specif...
ansible__ansible-builder-631
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_builder/_target_scripts/introspect.py:CollectionDefinition.__init__" ], "edited_modules": [ "src/ansible_builder/_target_scripts/introspect.py:CollectionDefinition" ...
ansible/ansible-builder
b86066b4903355fd0b1cab0655e879ed0f1543c8
[Feature request]: add `execution-environment.yaml` to file lookup during the build According to [YAML recommendations](https://yaml.org/faq.html) it would be great to support `yaml` file extension during lookup mechanism, for example, load files in that sequence: 1) `execution-environment.yaml` 2) `execution-environ...
diff --git a/docs/collection_metadata.rst b/docs/collection_metadata.rst index 37cb808..c98ee29 100644 --- a/docs/collection_metadata.rst +++ b/docs/collection_metadata.rst @@ -9,6 +9,7 @@ For Ansible Builder to find and install collection dependencies, those dependenc * The ``meta/execution-environment.yml`` file c...
ansible__ansible-builder-683
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_builder/containerfile.py:Containerfile._prepare_galaxy_install_steps" ], "edited_modules": [ "src/ansible_builder/containerfile.py:Containerfile" ] }, "file...
ansible/ansible-builder
4c9c6a716b00afe6a836eb5278265f17d32b77aa
Error when building an EE without requirements.yml The behaviour of #290 appears to have returned again: execution-image.yml ``` --- version: 3 images: base_image: name: quay.io/centos/centos:stream9 dependencies: ansible_core: package_pip: ansible-core==2.15.0 ansible_runner: ...
diff --git a/src/ansible_builder/containerfile.py b/src/ansible_builder/containerfile.py index c0c7051..6a516d5 100644 --- a/src/ansible_builder/containerfile.py +++ b/src/ansible_builder/containerfile.py @@ -434,6 +434,10 @@ class Containerfile: # in the final image. env = "ANSIBLE_GALAXY_DIS...
ansible__ansible-builder-687
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_builder/containerfile.py:Containerfile.prepare" ], "edited_modules": [ "src/ansible_builder/containerfile.py:Containerfile" ] }, "file": "src/ansible_builde...
ansible/ansible-builder
68707471bf690a10a362b21ab5eabd4732124e10
Building the image with Docker Engine 27+ gives some warnings ## Description Docker Engine 27+ uses new BuildKit 0.14+ to build images by default, and BuildKit 0.14.x has new feature that validates if syntax in Dockerfile meet best practices. > Default Dockerfile frontend has been updated to v1.8.0 > https://git...
diff --git a/Containerfile b/Containerfile index 555f369..0502aca 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,6 @@ ARG BASE_IMAGE=quay.io/centos/centos:stream9 -FROM $BASE_IMAGE as builder +FROM $BASE_IMAGE AS builder # build this library (meaning ansible-builder) COPY . /tmp/src COPY ./src/ansible_...
ansible__ansible-runner-1311
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_runner/config/runner.py:RunnerConfig.prepare" ], "edited_modules": [ "src/ansible_runner/config/runner.py:RunnerConfig" ] }, "file": "src/ansible_runner/con...
ansible/ansible-runner
514946771ec24999c026f692a4ccefdec0e11a96
Directory isolation copying fails in sandboxed environments The call to `shutil.copytree` when copying the project directory to the `directory_isolation_path` fails since `shutil.copytree`'s default functionality when the target directory already exists (which is created by the call to `tempfile.mkdtemp`) is to raise `...
diff --git a/docs/requirements.txt b/docs/requirements.txt index 35f8e29..0704274 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -30,4 +30,4 @@ sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.15 +urllib3==1.26.17...
ansible__ansible-runner-1312
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_runner/config/runner.py:RunnerConfig.prepare", "src/ansible_runner/config/runner.py:RunnerConfig.prepare_inventory", "src/ansible_runner/config/runner.py:RunnerConfig.wrap_ar...
ansible/ansible-runner
514946771ec24999c026f692a4ccefdec0e11a96
bwarp can't execute any binaries due to missing /lib symlink When testing sandbox execution, we were facing an issue where `bwrap` couldn't execute any commands: ```bash gbwrap: execvp ansible-playbook: No such file or directory ``` In debug mode, we pulled the command out ourselves and tested it with a system bi...
diff --git a/docs/requirements.txt b/docs/requirements.txt index 35f8e29..32dcfcb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -30,4 +30,4 @@ sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -urllib3==1.26.15 +urllib3==1.26.18...
ansible__ansible-runner-1331
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_runner/runner.py:Runner.run" ], "edited_modules": [ "src/ansible_runner/runner.py:Runner" ] }, "file": "src/ansible_runner/runner.py" } ]
ansible/ansible-runner
e0371d634426dfbdb9d3bfacb20e2dd4b039b499
pexpect stdout sampling race can cause event loss _EDIT: proposed fix at #1331_ Runner's stdout sampling is subject to a child process shutdown race when pexpect is in the mix, arguably because it's misusing the pexpect `logfile_read` callback: https://github.com/ansible/ansible-runner/blob/e0371d634426dfbdb9d3bf...
diff --git a/pyproject.toml b/pyproject.toml index 895f479..d740656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=45, <=67.7.2", "setuptools-scm[toml]>=6.2, <=7.1.0"] # pin max versions of build deps and update as needed +requires = ["setuptools>=45, <=69.0....
ansible__ansible-runner-1334
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/ansible_runner/runner.py:Runner.run" ], "edited_modules": [ "src/ansible_runner/runner.py:Runner" ] }, "file": "src/ansible_runner/runner.py" } ]
ansible/ansible-runner
309baadd7a70b059c5319ae5fa7baa8cb8ce9127
Remove runner tests from ansible-core, and re-implement +/- 1 core testing here The runner tests in core are pinned to some really old runner version, and don't really assert much of use, except that a very broad shape of data meets expectations. Remove these tests from core, and re-implement better testing, hopeful...
diff --git a/docs/execution_environments.rst b/docs/execution_environments.rst index 86b869a..f27f5d3 100644 --- a/docs/execution_environments.rst +++ b/docs/execution_environments.rst @@ -5,7 +5,7 @@ Using Runner with Execution Environments .. note:: - For an Execution Environments general technology overview an...
ansible__ansible-runner-161
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/runner.py:Runner.status_callback" ], "edited_modules": [ "ansible_runner/runner.py:Runner" ] }, "file": "ansible_runner/runner.py" } ]
ansible/ansible-runner
d9940a55288386abcce8e1e41bd93d8c671a06ca
Different data passed to status_handler plugin vs kwargs Hi, As you can see from my PR, I'm using `ansible.runner.run(status_handler=my_handler)`. I noticed that [Runner.status_callback](https://github.com/ansible/ansible-runner/blob/ce3c90f97fc7c7e7bdc6a53494503b9a907875c0/ansible_runner/runner.py#L76) passes diffe...
diff --git a/ansible_runner/runner.py b/ansible_runner/runner.py index 23b711b..2e8a6cf 100644 --- a/ansible_runner/runner.py +++ b/ansible_runner/runner.py @@ -71,12 +71,11 @@ class Runner(object): def status_callback(self, status): self.status = status + status_data = dict(status=status, runner...
ansible__ansible-runner-203
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/runner_config.py:RunnerConfig.prepare_env", "ansible_runner/runner_config.py:RunnerConfig.generate_ansible_command" ], "edited_modules": [ "ansible_runner/runn...
ansible/ansible-runner
3dc41ee10e423688a8cf59ced5f7416ddc19847f
then env/extravars are overwritten Take code from the docs and add extraverts variable ``` import ansible_runner extravars = { 'ansible_connection': 'local', 'test': 'extra' } r = ansible_runner.run(private_data_dir='/tmp/demo', playbook='test.yml', extravars=extravars) print("{}: {}".format(r.stat...
diff --git a/ansible_runner/runner_config.py b/ansible_runner/runner_config.py index 6d462d4..aa1dc22 100644 --- a/ansible_runner/runner_config.py +++ b/ansible_runner/runner_config.py @@ -25,10 +25,8 @@ import tempfile import logging from uuid import uuid4 -try: - from collections.abc import Mapping -except Imp...
ansible__ansible-runner-204
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/__main__.py:main" ], "edited_modules": [ "ansible_runner/__main__.py:main" ] }, "file": "ansible_runner/__main__.py" }, { "changes": { "add...
ansible/ansible-runner
b8ea1c103cedb47584cf6bb1dd7d0686c13d9262
No option to use multiple inventory files (and thus constructed inventories) a singular parameter: https://github.com/ansible/ansible-runner/blob/94f58c7c3667102dbafbf3b2349322c594deeccc/ansible_runner/runner_config.py#L249-L250 To be consistent with how Ansible core has operated since 2.4, it needs some way to ...
diff --git a/ansible_runner/__main__.py b/ansible_runner/__main__.py index 1a4ffb7..8e61dc3 100644 --- a/ansible_runner/__main__.py +++ b/ansible_runner/__main__.py @@ -281,11 +281,6 @@ def main(sys_args=None): with context: with role_manager(args) as args: - if args.inventory: - ...
ansible__ansible-runner-210
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/__main__.py:role_manager", "ansible_runner/__main__.py:main" ], "edited_modules": [ "ansible_runner/__main__.py:role_manager", "ansible_runner/__main__...
ansible/ansible-runner
f53109ccfe09ab2f9edfaffbd6c4a595fda7f1b6
implement project directory execution isolation The idea behind this is that when Runner starts execution it will copy the project directory and execute the runner invocation in that. The issue that leads to this arises when multiple invocations of Runner are sharing the project directory... if they are managing the...
diff --git a/ansible_runner/__main__.py b/ansible_runner/__main__.py index 8e61dc3..200b91e 100644 --- a/ansible_runner/__main__.py +++ b/ansible_runner/__main__.py @@ -68,11 +68,16 @@ def role_manager(args): kwargs.update(private_data_dir=args.private_data_dir, json_mode=args.json, ...
ansible__ansible-runner-309
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/runner_config.py:RunnerConfig.prepare_inventory", "ansible_runner/runner_config.py:RunnerConfig.generate_ansible_command" ], "edited_modules": [ "ansible_runne...
ansible/ansible-runner
b556af522dd6ba87ab39c90d01061c8a862f0196
Allow use of Inventory defined in ansible.cfg If `inventory` is not given to the runner, the configuration defaults to `private_data_dir/inventory`. https://github.com/ansible/ansible-runner/blob/31b4174663e3562af30e85175e833bf047e3df14/ansible_runner/runner_config.py#L200-L201 So with this, its always defined an `...
diff --git a/ansible_runner/runner_config.py b/ansible_runner/runner_config.py index 46d1f7d..69291f3 100644 --- a/ansible_runner/runner_config.py +++ b/ansible_runner/runner_config.py @@ -201,7 +201,7 @@ class RunnerConfig(object): """ Prepares the inventory default under ``private_data_dir`` if it's...
ansible__ansible-runner-315
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/loader.py:ArtifactLoader.get_contents" ], "edited_modules": [ "ansible_runner/loader.py:ArtifactLoader" ] }, "file": "ansible_runner/loader.py" }, { ...
ansible/ansible-runner
b26d57680812e81307455a76df9b4e979f933fd6
Unicode in environment variables break ansible-runner We run ansible-runner in Docker containers in Gitlab CI. ansible-runner breaks when a user with Umlauts in his name starts the runner, as the user's name (eg. `Müller`) is saved as environment variable. ```console [root@af4df578c2e7 /]# unset test [root@af4df...
diff --git a/ansible_runner/loader.py b/ansible_runner/loader.py index 7e358e7..55f9f69 100644 --- a/ansible_runner/loader.py +++ b/ansible_runner/loader.py @@ -18,6 +18,7 @@ # import os import json +import codecs from yaml import safe_load, YAMLError from six import string_types @@ -95,8 +96,7 @@ class Artifact...
ansible__ansible-runner-899
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/config/_base.py:BaseConfig._prepare_env" ], "edited_modules": [ "ansible_runner/config/_base.py:BaseConfig" ] }, "file": "ansible_runner/config/_base.py"...
ansible/ansible-runner
7fe85e791ab3194355c95d783c01d0333fca71bd
[Question] How to disable env/passwords to be created Hi, I run `ansible-runner` by providing password with a dict. It run with success. If I re-run the script. It's not working anymore. The issue is, when I run the first time the script, `ansible-runner` create a the file `env/passwords` with the content of what I...
diff --git a/ansible_runner/config/_base.py b/ansible_runner/config/_base.py index 217c46b..a1e996f 100644 --- a/ansible_runner/config/_base.py +++ b/ansible_runner/config/_base.py @@ -147,7 +147,7 @@ class BaseConfig(object): self.runner_mode = runner_mode try: if self.settings and isins...
ansible__ansible-runner-976
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "ansible_runner/config/runner.py:RunnerConfig.prepare" ], "edited_modules": [ "ansible_runner/config/runner.py:RunnerConfig" ] }, "file": "ansible_runner/config/runner.p...
ansible/ansible-runner
996a00dd0cd449e129a693e53b73770a6de34e36
Stop using `distutils` It's deprecated. Python 3.10 raises a `DeprecationWarning` and Python 3.12 won't have it in the stdlib anymore. Why fix it now and not wait for another 2 years when this will produce an `ImportError`? Because it's nice to solve such problems ahead of time and also since ansible-runner is a libra...
diff --git a/ansible_runner/config/runner.py b/ansible_runner/config/runner.py index 84852e1..9fb96bb 100644 --- a/ansible_runner/config/runner.py +++ b/ansible_runner/config/runner.py @@ -23,7 +23,7 @@ import shlex import stat import tempfile import six -import distutils.dir_util +import shutil from six import s...
antirotor__speedcopy-6
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "speedcopy/__init__.py:copyfile" ], "edited_modules": [ "speedcopy/__init__.py:copyfile" ] }, "file": "speedcopy/__init__.py" } ]
antirotor/speedcopy
78dee74fa0f0aef2c61f9f48f6389969f63272f7
Copying doesn't work if non-absolute filenames supplied ``` speedcopy.copyfile("C:/Temp/asdf", "C:/Temp/fdsa") ``` should work exactly the same as ``` os.chdir("C:/Temp") speedcopy.copyfile("asdf", "fdsa") ```
diff --git a/speedcopy/__init__.py b/speedcopy/__init__.py index c7b2c99..e681fd7 100644 --- a/speedcopy/__init__.py +++ b/speedcopy/__init__.py @@ -144,8 +144,8 @@ if not sys.platform.startswith("win32"): os.symlink(os.readlink(src), dst) else: fs_src_type = FilesystemInfo().filesyst...
antonagestam__collectfast-160
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "collectfast/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "collectfast/...
antonagestam/collectfast
7608d4f5061e954e17753b4ff3997356a1ffde5d
Breaking behavior 1.0.0 -> 1.3.0 (COLLECTSTATIC_STRATEGY) Not sure if bug or intentional, but `collectstatic` command will break if you don't define `COLLECTSTATIC_STRATEGY` or `STATICFILES_STORAGE` in your settings file (even if `COLLECTFAST_ENABLED = False`). ![image](https://user-images.githubusercontent.com/225...
diff --git a/collectfast/__init__.py b/collectfast/__init__.py index 67bc602..9c73af2 100644 --- a/collectfast/__init__.py +++ b/collectfast/__init__.py @@ -1,1 +1,1 @@ -__version__ = "1.3.0" +__version__ = "1.3.1" diff --git a/collectfast/management/commands/collectstatic.py b/collectfast/management/commands/collectst...
apache__airflow-38860
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "airflow/api_connexion/endpoints/import_error_endpoint.py:get_import_errors" ], "edited_modules": [ "airflow/api_connexion/endpoints/import_error_endpoint.py:get_import_errors" ...
apache/airflow
c25d346adf2e9bc7314c73ed47ce00200cc6cd30
`AirbyteTriggerSyncOperator` does not work on deferrable mode ### Apache Airflow Provider(s) airbyte ### Versions of Apache Airflow Providers apache-airflow-providers-airbyte==3.6.0 apache-airflow-providers-http==4.5.1 ### Apache Airflow version 2.7.1 ### Operating System Ubuntu 22.04.3 LTS ###...
diff --git a/airflow/api_connexion/endpoints/import_error_endpoint.py b/airflow/api_connexion/endpoints/import_error_endpoint.py index a56cb97c41..274d842d18 100644 --- a/airflow/api_connexion/endpoints/import_error_endpoint.py +++ b/airflow/api_connexion/endpoints/import_error_endpoint.py @@ -94,11 +94,9 @@ def get_im...
apache__airflow-39167
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "airflow/auth/managers/base_auth_manager.py:BaseAuthManager.is_authorized_custom_view" ], "edited_modules": [ "airflow/auth/managers/base_auth_manager.py:BaseAuthManager" ] ...
apache/airflow
596e9ea10c1e7359d63532b74f3b7f12b42599e5
Custom FAB actions no longer work ### Apache Airflow version 2.9.0 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? Before the auth manager/FAB transition in 2.9.0, plugins were able to include custom actions. This no longer works: ``` [2024-04-19T21:24:50.050+00...
diff --git a/airflow/auth/managers/base_auth_manager.py b/airflow/auth/managers/base_auth_manager.py index 4d5c249235..7bb4e92889 100644 --- a/airflow/auth/managers/base_auth_manager.py +++ b/airflow/auth/managers/base_auth_manager.py @@ -237,7 +237,7 @@ class BaseAuthManager(LoggingMixin): @abstractmethod ...
app-sre__sretoolbox-35
[ { "changes": { "added_entities": [ "sretoolbox/container/image.py:NoTagForImageByDigest.__init__" ], "added_modules": [ "sretoolbox/container/image.py:NoTagForImageByDigest" ], "edited_entities": [ "sretoolbox/container/image.py:Image.__init__", "sre...
app-sre/sretoolbox
33db29fb39b2d90a4c570f7be7319003ead8c611
_parse_image_url() doesn't support image digests A recent deploy of a Hive operator failed with: `Image does not exist: quay.io/****/pagerduty-operator-registry@sha256:bc1ed82a75f2ca160225b8281c50b7074e7678c2a1f61b1fb298e545b455925e` The image exists: ``` docker pull quay.io/****/pagerduty-operator-registry@s...
diff --git a/sretoolbox/container/image.py b/sretoolbox/container/image.py index f750ecf..8e9e083 100644 --- a/sretoolbox/container/image.py +++ b/sretoolbox/container/image.py @@ -22,6 +22,16 @@ class ImageComparisonError(Exception): """ +class NoTagForImageByDigest(Exception): + """ + Raised when the I...
app-sre__sretoolbox-53
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "sretoolbox/container/image.py:Image.__init__", "sretoolbox/container/image.py:Image._request_get", "sretoolbox/container/image.py:Image.__getitem__" ], "edited_modules": [ ...
app-sre/sretoolbox
072f8c60b2121b89be2c0028c55b925bd54d4472
Cache registry token We acquire a new token on every request: https://github.com/app-sre/sretoolbox/blob/master/sretoolbox/container/image.py#L355 We should probably make a more efficient use of it.
diff --git a/sretoolbox/container/image.py b/sretoolbox/container/image.py index 92bedf5..0721ab5 100644 --- a/sretoolbox/container/image.py +++ b/sretoolbox/container/image.py @@ -41,6 +41,7 @@ class NoTagForImageByDigest(Exception): Raised when the Image was constructed with a by-digest URL and an operation...
apriha__lineage-44
[ { "changes": { "added_entities": [ "lineage/individual.py:Individual.discrepant_positions", "lineage/individual.py:Individual.discrepant_genotypes", "lineage/individual.py:Individual._load_snps_helper" ], "added_modules": null, "edited_entities": [ "lineag...
apriha/lineage
1313da4a1ec291288287113f91027b356b8766fb
Return discrepant SNPs Return discrepant SNPs when adding SNPs to an ``Individual``.
diff --git a/README.rst b/README.rst index ff76836..d49a33c 100644 --- a/README.rst +++ b/README.rst @@ -97,24 +97,23 @@ Merge Raw Data Files The dataset for ``User662`` consists of three raw data files from two different DNA testing companies. Let's load the remaining two files. -As the data gets added, it's compa...
apriha__snps-97
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/snps/io/reader.py:Reader.__call__", "src/snps/io/reader.py:Reader.read_mapmygenome" ], "edited_modules": [ "src/snps/io/reader.py:Reader" ] }, "file": "src/...
apriha/snps
61bd4988ac7b02f10adb29d20e0be1028171a5ff
mapmygenome DTC file format has changed. The file format of mapymygenome has changed. After reading the file, the data frame reports zero rows. Request to update the reader. The new header is : SNP.Name Sample.ID Allele1...Top Allele2...Top GC.Score Sample.Name Sample.Group Sample.Index SNP.Index SNP.Aux Allele...
diff --git a/src/snps/io/reader.py b/src/snps/io/reader.py index 5d3af94..68d0705 100644 --- a/src/snps/io/reader.py +++ b/src/snps/io/reader.py @@ -167,8 +167,8 @@ class Reader: d = self.read_myheritage(file, compression) elif "Living DNA" in first_line: d = self.read_livingdna(file,...
argilla-io__argilla-1960
[ { "changes": { "added_entities": [ "src/argilla/client/models.py:_Validators._nat_to_none_and_one_to_now" ], "added_modules": null, "edited_entities": [ "src/argilla/client/models.py:_Validators._check_value_length", "src/argilla/client/models.py:_Validators._nat_...
argilla-io/argilla
1a528199a29e25df0cb7f710cc04e0605f4be3e3
Server: Improve message and docs for telemetry opt-out when using docker-compose **Is your feature request related to a problem? Please describe.** When running Argilla server using Docker compose, I'd like to have a more clear documentation on how to opt-out **Describe the solution you'd like** I'd like to see a ...
diff --git a/docker-compose.yaml b/docker-compose.yaml index b4c0d62fe..b39fb7843 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,6 +8,10 @@ services: - "6900:80" environment: ARGILLA_ELASTICSEARCH: http://elasticsearch:9200 + # Opt-out for telemetry https://docs.argilla.io/en/l...
argilla-io__argilla-1970
[ { "changes": { "added_entities": [ "src/argilla/client/models.py:_Validators._nat_to_none_and_one_to_now" ], "added_modules": null, "edited_entities": [ "src/argilla/client/models.py:_Validators._check_value_length", "src/argilla/client/models.py:_Validators._nat_...
argilla-io/argilla
7d5a34a8565491f4c6738e270ddf2867fbb01334
feat: Set a default value to the `event_timestamp` field **Describe the bug** After going through the quickstart. The Kibana records don't contain time information, besides, `last_updated`. **To Reproduce** Steps to reproduce the behavior: 1. Initialize your Argilla with Kibana 2. Upload the [quickstart](https:...
diff --git a/docs/_source/guides/features/datasets.ipynb b/docs/_source/guides/features/datasets.ipynb index c09371468..a429f4173 100644 --- a/docs/_source/guides/features/datasets.ipynb +++ b/docs/_source/guides/features/datasets.ipynb @@ -56,6 +56,70 @@ "The Dataset classes do some extra checks for you, to make ...
argilla-io__argilla-2337
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "src/argilla/client/models.py:_Validators" ] }, "file": "src/argilla/client/models.py" } ]
argilla-io/argilla
5f0627cf523fdfcb2efeb7ae5663c3e9a845ecb9
Python Client side record validation using `pydantic.validators` **Is your feature request related to a problem? Please describe.** Errors only get detected after having tried to log the data. **Describe the solution you'd like** Detect errors from the python client when creating the record, instead of doing so on...
diff --git a/README.md b/README.md index 87474b4e3..b034e12f1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ ### Advanced NLP labeling -- Programmatic labeling using [weak supervision](https://docs.argilla.io/en/latest/guides/techniques/weak_supervision.html). Built-in label models (Snorkel, Flyingsquid)...
argoproj-labs__gordian-42
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "gordian/repo.py:Repo.get_files" ], "edited_modules": [ "gordian/repo.py:Repo" ] }, "file": "gordian/repo.py" } ]
argoproj-labs/gordian
5924837aac8e416abd170bebd8c3ccac614b1fd5
Fetching of all files It appears gordian is fetching all the files of a repo even if you only need 1.
diff --git a/CHANGELOG.md b/CHANGELOG.md index cab46c1..eafba89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](ht...
arista-eosplus__pyeapi-172
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyeapi/client.py:connect" ], "edited_modules": [ "pyeapi/client.py:connect" ] }, "file": "pyeapi/client.py" }, { "changes": { "added_entities": [ ...
arista-eosplus/pyeapi
96a74faef1fe3bd79c4e900aed29c9956a0587d6
API doesn't support authentication other than username/password Please provide support for some method other than username/password in a text file to access the API. SSH support exists for SSH keys, maybe allow the same key to be used to generate client x.509 certificates.
diff --git a/docs/configfile.rst b/docs/configfile.rst index 49689c3..b34a304 100644 --- a/docs/configfile.rst +++ b/docs/configfile.rst @@ -39,13 +39,15 @@ The following configuration options are available for defining node entries: - http_local (available in EOS 4.14.5 or later) - http - https + ...
arnaudmiribel__streamlit-extras-102
[ { "changes": { "added_entities": [ "src/streamlit_extras/no_default_selectbox/__init__.py:_transform_arguments" ], "added_modules": [ "src/streamlit_extras/no_default_selectbox/__init__.py:_transform_arguments" ], "edited_entities": [ "src/streamlit_extras/n...
arnaudmiribel/streamlit-extras
883c06919a6b6e16edbb55b4698591557eea9f0f
No-default selectbox doesn't work if you pass a Series
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cddc01a..8de794d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: -- repo: https://gitlab.com/pycqa/flake8 +- repo: https://github.com/pycqa/flake8 rev: "4.0.1" hooks: - id: flake8 diff --git a/src/st...
arnavb__pypokedex-7
[ { "changes": { "added_entities": null, "added_modules": [ "pypokedex/pokemon.py:Sprites" ], "edited_entities": [ "pypokedex/pokemon.py:Pokemon.__init__", "pypokedex/pokemon.py:Pokemon.learns" ], "edited_modules": [ "pypokedex/pokemon.py:Pokemon...
arnavb/pypokedex
1963ea43da7ca5d4dcec4c47b286d0992cd9895e
Add Support for Sprites This pokedex has pretty much every detail you need other than sprites. Adding sprite support shouldn't be too hard and will complete this project.
diff --git a/.gitignore b/.gitignore index 80aa5ff..38f584a 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,4 @@ pip-selfcheck.json # End of https://www.gitignore.io/api/python .vscode/ +.DS_Store diff --git a/README.md b/README.md index e358894..6832374 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,8...
arrow-py__arrow-1035
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/factory.py:ArrowFactory.get" ], "edited_modules": [ "arrow/factory.py:ArrowFactory" ] }, "file": "arrow/factory.py" } ]
arrow-py/arrow
80e5947de29b49c52c84c7bce9dedbf5532606fa
Arrow 1.1.1 doesn't support get from decimal, but 0.15.2 support <!-- Thanks for taking the time to submit this bug report. Please provide us with a detailed description of the bug and a bit of information about your system. --> ## Issue Description Arrow 1.1.1 doesn't support get from decimal, but 0.15.2 su...
diff --git a/arrow/factory.py b/arrow/factory.py index 5787dcf..aad4af8 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -9,6 +9,7 @@ construction scenarios. import calendar from datetime import date, datetime from datetime import tzinfo as dt_tzinfo +from decimal import Decimal from time import struct_time ...
arrow-py__arrow-1077
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/arrow.py:Arrow.dehumanize" ], "edited_modules": [ "arrow/arrow.py:Arrow" ] }, "file": "arrow/arrow.py" }, { "changes": { "added_entities": null, ...
arrow-py/arrow
be57df5a7474dda3f6c16176ad181fa176039f2c
Humanize Format Relative Error For Multiple Granularities <!-- Thanks for taking the time to submit this bug report. Please provide us with a detailed description of the bug and a bit of information about your system. --> ## Issue Description <!-- Replace this comment block with a description of the bug. ...
diff --git a/arrow/arrow.py b/arrow/arrow.py index fef66c1..d750445 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -1384,7 +1384,7 @@ class Arrow: search_string = search_string.format(r"\d+") # Create search pattern and find within string - pattern = re.compile(fr...
arrow-py__arrow-1079
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "arrow/constants.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules"...
arrow-py/arrow
a2ebb7e20b4897ee7b7bf4676a5ac3e6c0f27f47
Czech/Slovak Locales Humanize Error When Zero Delta <!-- Thanks for taking the time to submit this bug report. Please provide us with a detailed description of the bug and a bit of information about your system. --> ## Issue Description The Czech and Slovak locales fail when using Humanize on a delta of zero...
diff --git a/arrow/constants.py b/arrow/constants.py index d26bc0d..1189d07 100644 --- a/arrow/constants.py +++ b/arrow/constants.py @@ -110,6 +110,10 @@ DEHUMANIZE_LOCALES = { "da-dk", "ml", "hi", + "cs", + "cs-cz", + "sk", + "sk-sk", "fa", "fa-ir", "mr", diff --git a/arrow/lo...
arrow-py__arrow-845
[ { "changes": { "added_entities": [ "arrow/arrow.py:Arrow.imaginary" ], "added_modules": null, "edited_entities": [ "arrow/arrow.py:Arrow.range", "arrow/arrow.py:Arrow.span", "arrow/arrow.py:Arrow.shift" ], "edited_modules": [ "arrow/arr...
arrow-py/arrow
80aa80c0ebbffa17bf07ff668a1512653367ae92
Wrong result when a shift involves a DST change. In paris in 2013, we changed to DST in 2013-03-31 (at 2 AM it was 3 AM), from UTC+1 to UTC+2 (DST) Here's an example of the issue I have with arrow : ``` python >>> import arrow, datetime >>> just_before = arrow.get(datetime.datetime(2013, 03, 31, 1, 50, 45), "Europe...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 8c442c9..79b64a4 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -381,7 +381,7 @@ class Arrow(object): yield current values = [getattr(current, f) for f in cls._ATTRS] - current = cls(*values, tzinfo=tzinfo) + relativedelta( +...
arrow-py__arrow-868
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/arrow.py:Arrow.humanize" ], "edited_modules": [ "arrow/arrow.py:Arrow" ] }, "file": "arrow/arrow.py" } ]
arrow-py/arrow
fe9602e2171d49d0d95d775e71f9735c3aaf92e4
humanize() rounding problem <!-- Thanks for taking the time to submit this bug report. Please provide us with a detailed description of the bug and a bit of information about your system. --> ## Issue Description Not sure if this is wanted or a bug. `humanize()` returns "a week ago" for deltas < 7 days. For ...
diff --git a/arrow/arrow.py b/arrow/arrow.py index 4fe9541..f3706b5 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -72,7 +72,7 @@ class Arrow(object): _SECS_PER_DAY = float(60 * 60 * 24) _SECS_PER_WEEK = float(60 * 60 * 24 * 7) _SECS_PER_MONTH = float(60 * 60 * 24 * 30.5) - _SECS_PER_YEAR = float...
arrow-py__arrow-906
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/factory.py:ArrowFactory.get" ], "edited_modules": [ "arrow/factory.py:ArrowFactory" ] }, "file": "arrow/factory.py" } ]
arrow-py/arrow
b66baf74172c209e2d038ae0d0cd2a6635d23cc0
Should arrow.get(None) work? As per the title should the following work? ```shell >>> arrow.get(None) <Arrow [2020-12-20T20:12:12.631217+00:00]> ``` https://github.com/arrow-py/arrow/blob/master/arrow/factory.py#L169 There could be an issue where someone unintentionally passes `None` in but gets no error. R...
diff --git a/arrow/factory.py b/arrow/factory.py index b251704..9aa44b8 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -165,9 +165,9 @@ class ArrowFactory: if arg_count == 1: arg = args[0] - # (None) -> now, @ utc. + # (None) -> raises an exception if ...
arrow-py__arrow-968
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/factory.py:ArrowFactory.get" ], "edited_modules": [ "arrow/factory.py:ArrowFactory" ] }, "file": "arrow/factory.py" } ]
arrow-py/arrow
fe1aaaee3e14ccb256dd2aa74e07c84226cd4b05
arrow.get(datetime.now()).humanize() == "6 hours ago" # Issue Description It looks like `arrow` is doing something weird timezone information when operating `datetime` objects, including `datetime` objects returned by e.g. `dateparser.parse('now')`. What is the appropriate incantation to get `arrow` and `datetime...
diff --git a/arrow/factory.py b/arrow/factory.py index 27dea5c..5787dcf 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -205,14 +205,14 @@ class ArrowFactory: if len(kwargs) == 1 and tz is None: arg_count = 3 - # () -> now, @ utc. + # () -> now, @ tzinfo or utc if ...
arrow-py__arrow-986
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arrow/locales.py:Locale.describe", "arrow/locales.py:Locale.describe_multi", "arrow/locales.py:HebrewLocale._format_timeframe", "arrow/locales.py:HebrewLocale.describe_multi" ...
arrow-py/arrow
f1df58b321c43bc0caf6c1a669b3f814f9159bbc
Floats in humanize output for languages overriding _format_timeframe <!-- Thanks for taking the time to submit this bug report. Please provide us with a detailed description of the bug and a bit of information about your system. --> ## Issue Description Doing humanize on languages that override _format_time...
diff --git a/arrow/locales.py b/arrow/locales.py index d445f2e..7ad396e 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -147,7 +147,7 @@ class Locale: :param only_distance: return only distance eg: "11 seconds" without "in" or "ago" keywords """ - humanized = self._format_timeframe(ti...
arup-group__genet-225
[ { "changes": { "added_entities": [ "genet/max_stable_set.py:get_indices_of_chosen_problem_graph_nodes" ], "added_modules": [ "genet/max_stable_set.py:get_indices_of_chosen_problem_graph_nodes" ], "edited_entities": [ "genet/max_stable_set.py:MaxStableSet.sol...
arup-group/genet
a7e484f55e1a378b2ef2e11577a9fbb53d2c643b
Reference to stop name changes during snapping+routing on network The step to [process outputs of pyomo model](https://github.com/arup-group/genet/blob/main/genet/max_stable_set.py#L301) strips too much of the string. It changes the name of the stop, if the stop name begins with an 'x' - this leads to routing issues be...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 13315de..4954692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] ### Fixed +* Fixed problem snapping and routing PT services with stops whose names started with 'x' [#225](https://github.com/arup-group/genet/pull/225) * Fixed summary repor...
arviz-devs__arviz-1117
[ { "changes": { "added_entities": [ "arviz/stats/stats.py:_hpd", "arviz/stats/stats.py:_hpd_multimodal" ], "added_modules": [ "arviz/stats/stats.py:_hpd", "arviz/stats/stats.py:_hpd_multimodal" ], "edited_entities": [ "arviz/stats/stats.py:hpd...
arviz-devs/arviz
9909aab2e4a1a4ad897c31c3dac2487037d0c3ad
Unexpected behavior when using `pm.hpd` with multidimensional (ndim>2)posterior arrays **Describe the bug** I am using `hpd` on multi-dimensional posteriors with larger than 2 dimensions. One example of where this can come up is if I use a 2D array to represent the coefficients for the interaction between levels of 2 ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index b2bf074..babee92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,14 +8,16 @@ * Add `num_chains` and `pred_dims` arguments to io_pyro #1090 * Integrate jointplot into pairplot, add point-estimate and overlay of plot kinds (#1079) * Allow xarray.Dataarray input for plo...
arviz-devs__arviz-1403
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/backends/bokeh/densityplot.py:plot_density" ], "edited_modules": [ "arviz/plots/backends/bokeh/densityplot.py:plot_density" ] }, "file": "arviz/plots/backen...
arviz-devs/arviz
40589dd9658afff4e905ef3b61a65ffeb7e66b24
Error plotting a single variable with plot_density and bokeh backend **Describe the bug** Over in ArviZ.jl, we use the Julia equivalent to the below snippet to test Bokeh integration for `plot_density`. It worked fine until recently, where we now get an error with bokeh only but not matplotlib, though I'm not certain ...
diff --git a/arviz/plots/backends/bokeh/densityplot.py b/arviz/plots/backends/bokeh/densityplot.py index 7ede6ce..eb8dcec 100644 --- a/arviz/plots/backends/bokeh/densityplot.py +++ b/arviz/plots/backends/bokeh/densityplot.py @@ -63,7 +63,7 @@ def plot_density( rows, cols, figsize=...
arviz-devs__arviz-1419
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/backends/bokeh/rankplot.py:plot_rank" ], "edited_modules": [ "arviz/plots/backends/bokeh/rankplot.py:plot_rank" ] }, "file": "arviz/plots/backends/bokeh/ran...
arviz-devs/arviz
0e4e188add3f6a66dba01d8f4cc1a077ccfcf5d4
plot_rank ignores backend_kwargs Using `plot_rank` on many a trace with many coefficients can require changing the line widths and marker sizes (e.g. when using `kind="vlines"`). This usage however has no effect: `az.plot_rank(many_coefficient_trace, backend_kwargs={'linewidth':0.5, 'markersize':1, 's':1})` ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7da3e3b..c82f6d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Added `to_dataframe` method to InferenceData ([1395](https://github.com/arviz-devs/arviz/pull/1395)) * Added `__getitem__` magic to InferenceData ([1395](https://github.com/arviz-devs/arviz/p...
arviz-devs__arviz-1556
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/backends/matplotlib/ppcplot.py:plot_ppc" ], "edited_modules": [ "arviz/plots/backends/matplotlib/ppcplot.py:plot_ppc" ] }, "file": "arviz/plots/backends/mat...
arviz-devs/arviz
263b44f85f4faf8b3f9d727f89d3d971c8264788
Add dataframe to InfData examples to cookbook ## Tell us about it Add dataframe to InfData examples to cookbook https://arviz-devs.github.io/arviz/getting_started/InferenceDataCookbook.html?highlight=cookbook ``` import pandas as pd import xarray as xr import arviz as az import numpy as np df = Datasets.W...
diff --git a/CHANGELOG.md b/CHANGELOG.md index c40d2b0..9fae664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Maintenance and fixes * Updated `from_cmdstan`, `from_numpyro` and `from_pymc3` converters to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541), [1525](https:/...
arviz-devs__arviz-1647
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/stats/stats.py:loo", "arviz/stats/stats.py:psislw", "arviz/stats/stats.py:waic", "arviz/stats/stats.py:loo_pit" ], "edited_modules": [ "arviz/stats/stat...
arviz-devs/arviz
d10e5b3f1d71152f06e6d138807118c36cbd122b
az.loo fails when "sample" already exists as a dimension **Describe the bug** `az.loo` fails if there is a dimension named `sample` in the `log_likelihood` data variable. It looks like the `log_likelihood.stack(sample=("chain", "draw"))` line is the culprit. **To Reproduce** ```python import arviz as az data...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d44fd..56af478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Upload updated mypy.ini in ci if mypy copilot fails ([1624](https://github.com/arviz-devs/arviz/pull/1624)) * Added type checking to raise an error whenever `InferenceData` object is passed...
arviz-devs__arviz-1707
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/backends/bokeh/posteriorplot.py:_plot_posterior_op" ], "edited_modules": [ "arviz/plots/backends/bokeh/posteriorplot.py:_plot_posterior_op" ] }, "file": "ar...
arviz-devs/arviz
479f2a71a3f7b31e1085dd6c7ae77a45dd3a50e5
Posterior plot errors with boolean array When passed a boolean array, `plot_posterior` fails with the following error because `np.histogram` assumes that subtraction is defined on the array: ```python TypeError('numpy boolean subtract, the `-` operator, is not supported, use the bitwise_xor, the `^` operator, or the ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index f833db1..dd27e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ * Fix R2 implementation ([1666](https://github.com/arviz-devs/arviz/pull/1666)) * Added warning message in `plot_dist_comparison()` in case subplots go over the limit ([1688](https://github.c...
arviz-devs__arviz-1710
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/backends/bokeh/kdeplot.py:plot_kde" ], "edited_modules": [ "arviz/plots/backends/bokeh/kdeplot.py:plot_kde" ] }, "file": "arviz/plots/backends/bokeh/kdeplot...
arviz-devs/arviz
93f8f1c219dc2a012e6a7e149b6a031f2de688e7
plot_posterior doesn' accept label as kwarg I think this is related to how we pass kwargs downstream to plot_dist or plot_kde... will look into it at some point unless someone beats me to it. My hunch is that plot_dist and plot_kde have a `label` argument and pass it explicitly to matplotlib instead of doing `setdefaul...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b57b79..19b58b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ * Renamed `sample` dim to `__sample__` when stacking `chain` and `draw` to avoid dimension collision ([1647](https://github.com/arviz-devs/arviz/pull/1647)) * Removed the `circular` argument ...
arviz-devs__arviz-1988
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/densityplot.py:plot_density" ], "edited_modules": [ "arviz/plots/densityplot.py:plot_density" ] }, "file": "arviz/plots/densityplot.py" } ]
arviz-devs/arviz
9d74000d3d0a1599b017a5dc612388a0663d2f36
plot_density has no filter_vars argument I think it should have the argument. It may be a little more complicated given the multiple idata input but is should still be feasible.
diff --git a/arviz/plots/densityplot.py b/arviz/plots/densityplot.py index cc90a63..dd881a8 100644 --- a/arviz/plots/densityplot.py +++ b/arviz/plots/densityplot.py @@ -17,6 +17,7 @@ def plot_density( group="posterior", data_labels=None, var_names=None, + filter_vars=None, transform=None, hd...
arviz-devs__arviz-2011
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/stats/stats.py:psislw", "arviz/stats/stats.py:_psislw" ], "edited_modules": [ "arviz/stats/stats.py:psislw", "arviz/stats/stats.py:_psislw" ] }, "...
arviz-devs/arviz
683fff23c427c5ea28c0085bd6aacda7f7b49599
arviz's psislw differs from loo's psis ArviZ's implementation of PSIS sometimes agrees with the loo package's implementation and sometimes does not. Here's an example where `arviz.psislw` and `loo.psis` disagree: ```python import arviz, rpy2 import numpy as np import scipy as sp from rpy2.robjects import numpy2r...
diff --git a/CHANGELOG.md b/CHANGELOG.md index cfb358d..fe0faa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### New features ### Maintenance and fixes +* `psislw` now smooths log-weights even when shape is lower than `1/3`([2011](https://github.com/arviz-devs/arviz/pull/2011)) ### Deprecation ...
arviz-devs__arviz-2413
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/plots/hdiplot.py:plot_hdi" ], "edited_modules": [ "arviz/plots/hdiplot.py:plot_hdi" ] }, "file": "arviz/plots/hdiplot.py" }, { "changes": { "added_e...
arviz-devs/arviz
0fc11178e3802de9e2e6557ce455cced9a22974f
Categorical x apparently not supported by arviz.plot_hdi() Hello arviz-devs! Thanks for a wonderful package. This issue comes from a [discussion on the PyMC discourse](https://discourse.pymc.io/t/unexpected-behavior-with-arviz-plot-hdi-with-categorical-x/16403) including @tomicapretto and I. **Describe the bug** To m...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4798a43..687b1db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Only emit a warning for custom groups in `InferenceData` when explicitly requested ([2401](https://github.com/arviz-devs/arviz/pull/2401)) - Splits Bayes Factor computation out from `az.plot_...
arviz-devs__arviz-588
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/stats/stats.py:summary" ], "edited_modules": [ "arviz/stats/stats.py:summary" ] }, "file": "arviz/stats/stats.py" } ]
arviz-devs/arviz
0044d4d963391fe4a4109513bd42cf814759c6d4
`from_dict` missing in docs Looks like `from_netcdf` shows up twice, and `from_dict` appears 0 times! https://arviz-devs.github.io/arviz/api.html#data Looks like a one line change in https://github.com/arviz-devs/arviz/blob/master/doc/api.rst ![image](https://user-images.githubusercontent.com/2295568/52542395-...
diff --git a/arviz/stats/stats.py b/arviz/stats/stats.py index b31d2fb..7358e5b 100644 --- a/arviz/stats/stats.py +++ b/arviz/stats/stats.py @@ -629,13 +629,14 @@ def summary( Return format is either pandas.DataFrame {'wide', 'long'} or xarray.Dataset {'xarray'}. round_to : int Number of decimals...
arviz-devs__arviz-991
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "arviz/stats/diagnostics.py:_bfmi" ], "edited_modules": [ "arviz/stats/diagnostics.py:_bfmi" ] }, "file": "arviz/stats/diagnostics.py" } ]
arviz-devs/arviz
c3158613f9e793902eddd0e5ecd715595c31c824
Incorrect denominator in bfmi The original equation for `bfmi` is at the bottom of page 7 in [this paper](https://arxiv.org/pdf/1604.00695v1.pdf). The numerator in numpy for a vector `E` is `(length(E) - 1) * np.mean(np.square(np.diff(E)))`. The denominator is `(length(E) - 1) * np.var(E, ddof = 1)`. The two scaling fa...
diff --git a/arviz/stats/diagnostics.py b/arviz/stats/diagnostics.py index eae8692..21577b6 100644 --- a/arviz/stats/diagnostics.py +++ b/arviz/stats/diagnostics.py @@ -46,6 +46,7 @@ def bfmi(data): Examples -------- Compute the BFMI of an InferenceData object + .. ipython:: In [1]: impor...
arviz-devs__xarray-einstats-56
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/xarray_einstats/einops.py:process_pattern_list", "src/xarray_einstats/einops.py:_rearrange", "src/xarray_einstats/einops.py:rearrange", "src/xarray_einstats/einops.py:_reduce...
arviz-devs/xarray-einstats
f51ac7333bfa78b2e1cfc38a72c291a2e3b16097
Support non-string dimension names in einops module It should be possible to allow any hashable when using lists as input for `pattern` and `pattern_aux`. This issue is to track work on this. It might also be possible to be a bit more flexible with types, but I am not very versed in that, so help is very welcome on any...
diff --git a/docs/source/background/einops.md b/docs/source/background/einops.md index 17eab74..f726c8f 100644 --- a/docs/source/background/einops.md +++ b/docs/source/background/einops.md @@ -13,8 +13,7 @@ of the elements respectively: `->`, space as delimiter and parenthesis: side in the einops notation is only us...
arvkevi__kneed-53
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "kneed/knee_locator.py:KneeLocator.__init__" ], "edited_modules": [ "kneed/knee_locator.py:KneeLocator" ] }, "file": "kneed/knee_locator.py" }, { "changes": { ...
arvkevi/kneed
cb35c9b21ac551eb3af5fa1372745e6bd57f084d
KneeLocator fails if there are flat extrema This simple example fails: ```python from kneed import KneeLocator x = [0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0] y = [1, 0.787701317715959, 0.7437774524158126, 0.6559297218155198, 0.5065885797950219, 0.3674963396778...
diff --git a/kneed/knee_locator.py b/kneed/knee_locator.py index 82412bc..c8c1954 100644 --- a/kneed/knee_locator.py +++ b/kneed/knee_locator.py @@ -81,12 +81,12 @@ class KneeLocator(object): # Step 4: Identify local maxima/minima # local maxima - self.maxima_indices = argrelextrema(self.y_di...
asdf-format__asdf-1197
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_display.py:render_tree", "asdf/_display.py:_filter_tree" ], "edited_modules": [ "asdf/_display.py:render_tree", "asdf/_display.py:_filter_tree" ] }, ...
asdf-format/asdf
863df6d27e581357977d532880c2a4f5dffabe84
Provide a way of getting schema information given a node
diff --git a/CHANGES.rst b/CHANGES.rst index efb9fddd..1e3da514 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,8 @@ - Update citation. [#1184] - Add search support to `~asdf.AsdfFile.schema_info`. [#1187] +- Add `asdf.search.AsdfSearchResult` support for `~asdf.AsdfFile.schema_info` and + `~asdf.search.Asdf...
asdf-format__asdf-1361
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/entry_points.py:_list_entry_points" ], "edited_modules": [ "asdf/entry_points.py:_list_entry_points" ] }, "file": "asdf/entry_points.py" } ]
asdf-format/asdf
7b52d3b689a8a35ac2bf3db5be5214d752afbbb3
Add deprecations for 'legacy' extension system The 'legacy' extensions should raise deprecation warnings in 2.15 as they will be removed in 3.0. Warnings should be issued for: - [x] [CustomType](https://github.com/asdf-format/asdf/blob/cbc066dad91f236236dc04c6bd14a08ae84f01cb/asdf/types.py#L400): https://github.com/...
diff --git a/CHANGES.rst b/CHANGES.rst index 16e6fcfc..10bc7e07 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -32,6 +32,7 @@ The ASDF Standard is at v1.6.0 get_cached_asdf_extension_list in asdf.extension [#1409] - move asdf.types.format_tag to asdf.testing.helpers.format_tag [#1433] - Deprecate AsdfExtenion, Asdf...
asdf-format__asdf-1433
[ { "changes": { "added_entities": [ "asdf/_types.py:__getattr__" ], "added_modules": [ "asdf/_types.py:__getattr__" ], "edited_entities": [ "asdf/_types.py:format_tag", "asdf/_types.py:ExtensionType.make_yaml_tag" ], "edited_modules": [ ...
asdf-format/asdf
ce78addb83219caaa7949c4cfc2ed272b9f4383b
Find suitable new location for `format_tag` This is currently in the soon the be deprecated `asdf.types`: https://github.com/asdf-format/asdf/blob/f726fe8a2ccaa3faf33713738510aa103836cfa3/asdf/types.py#L17-L29 It does not depend on the legacy type system and could be moved to a new location. I've only found 1 u...
diff --git a/CHANGES.rst b/CHANGES.rst index c93a4760..49f9e300 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,6 +30,7 @@ The ASDF Standard is at v1.6.0 - Add AsdfDeprecationWarning to asdf.types [#1401] - deprecate default_extensions, get_default_resolver and get_cached_asdf_extension_list in asdf.extension [#...
asdf-format__asdf-1451
[ { "changes": { "added_entities": [ "asdf/generic_io.py:RealFile._fix_permissions", "asdf/generic_io.py:RealFile.__exit__" ], "added_modules": null, "edited_entities": [ "asdf/generic_io.py:GenericFile.close", "asdf/generic_io.py:RealFile.close" ], ...
asdf-format/asdf
35c173c9d4b843b266b340b783e265caf3d97399
asdf produces files with file permissions that differ from default files ```python with open('test', 'wb') as f: pass ``` produces a file with `-rw-r--r--` ```python af = asdf.AsdfFile({}) af.write_to('test.asdf') ``` produces a file with `-rw-------`
diff --git a/CHANGES.rst b/CHANGES.rst index b81f09d9..4deda47b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -34,6 +34,7 @@ The ASDF Standard is at v1.6.0 - Deprecate AsdfExtenion, AsdfExtensionList, BuiltinExtension [#1429] - Add AsdfDeprecationWarning to asdf_extensions entry point [#1361] - Deprecate asdf.tests....
asdf-format__asdf-1508
[ { "changes": { "added_entities": [ "asdf/asdf.py:AsdfFile._write_to", "asdf/asdf.py:SerializationContext.get_block_data_callback", "asdf/asdf.py:SerializationContext.assign_block_key", "asdf/asdf.py:SerializationContext.find_block_index" ], "added_modules": null...
asdf-format/asdf
3aea2c13cb1855e75cdc4df6c19a30c645974eff
Calling update after write_to fails The following example fails in asdf 2.14.4 (and the current main head) ```python import asdf import numpy fn1 = 'test1.asdf' fn2 = 'test2.asdf' tree = {'a': numpy.zeros(3), 'b': numpy.ones(3)} af = asdf.AsdfFile(tree) af.write_to(fn1) with asdf.open(fn1, mode='rw') a...
diff --git a/CHANGES.rst b/CHANGES.rst index 6bfcb1ed..006727c8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,7 @@ The ASDF Standard is at v1.6.0 - Add ``all_array_storage``, ``all_array_compression`` and ``all_array_compression_kwargs`` to ``asdf.config.AsdfConfig`` [#1468] - Move built-in tags to convert...
asdf-format__asdf-1575
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/asdf.py:AsdfFile.close" ], "edited_modules": [ "asdf/asdf.py:AsdfFile" ] }, "file": "asdf/asdf.py" } ]
asdf-format/asdf
bf1843ef8bcbe1d89623e26659ff408362f62fc7
closed `AsdfFile` instances hold private reference to tree After `close` an `AsdfFile` instance will prevent tree access through the `tree` property: https://github.com/asdf-format/asdf/blob/b0c9a50e8d3add337e1271369a3bf834925176a4/asdf/asdf.py#L552-L562 However, because `AsdfFile._tree` is not cleared, the closed ...
diff --git a/CHANGES.rst b/CHANGES.rst index d74d5808..d1c4525b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -19,6 +19,7 @@ The ASDF Standard is at v1.6.0 - Removed deprecated AsdfFile.open and deprecated asdf.open AsdfFile.write_to and AsdfFile.update kwargs [#1592] - Fix ``AsdfFile.info`` loading all array data...
asdf-format__asdf-1625
[ { "changes": { "added_entities": [ "asdf/extension/_serialization_context.py:SerializationContext.set_array_storage", "asdf/extension/_serialization_context.py:SerializationContext.get_array_storage", "asdf/extension/_serialization_context.py:SerializationContext.set_array_compress...
asdf-format/asdf
42106511b7b9378e4293b49555ad9b61ee702415
Extensions lack full support of type system features Extensions are unable to replace the type system due to lack of support for: - custom validators: https://github.com/asdf-format/asdf/pull/1287 - equivalent `reserve_blocks` hook: https://github.com/astropy/asdf-astropy/issues/156 - block access: https://github.co...
diff --git a/asdf/extension/_serialization_context.py b/asdf/extension/_serialization_context.py index 80ed8cdc..95e2a0b6 100644 --- a/asdf/extension/_serialization_context.py +++ b/asdf/extension/_serialization_context.py @@ -147,6 +147,86 @@ class SerializationContext: def assign_blocks(self): pass + ...
asdf-format__asdf-1654
[ { "changes": { "added_entities": [ "asdf/extension/_manager.py:_resolve_type", "asdf/extension/_manager.py:ExtensionManager._index_converters" ], "added_modules": [ "asdf/extension/_manager.py:_resolve_type" ], "edited_entities": [ "asdf/extension/_m...
asdf-format/asdf
1722dcf5ca384c94da5da9a155ad18b3b618c0a4
Consider inspecting modules for class paths Currently asdf converters can express types as either classes or strings (interpreted as class paths). Taking the `AngleConverter` in `asdf-astropy` as an example. It uses class paths: ```python class AngleConverter(QuantityConverter): tags = ("tag:astropy.org:astro...
diff --git a/CHANGES.rst b/CHANGES.rst index 0b19deec..9b7e451c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,10 @@ extension was created from a manifest registered with a uri that does not match the id in the manifest [#1785] +- Allow converters to provide types as strings that can + resolve to publ...
asdf-format__asdf-1687
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_display.py:_TreeRenderer._render_node_value" ], "edited_modules": [ "asdf/_display.py:_TreeRenderer" ] }, "file": "asdf/_display.py" }, { "changes": { ...
asdf-format/asdf
334f6c387baebb1a9dd41c681d2b71806b84c3a8
asdftool repr for Time objects Using `asdftool info <file>` on an ASDF file containing astropy.time.Time objects produces the following (excerpted) output: ``` │ │ ├─type (str): WFI_IMAGE │ │ ├─start_time (Time) # UTC exposure start time │ │ ├─mid_time (Time) # UTC exposure mid time │ │ ├─end_time (Time) #...
diff --git a/CHANGES.rst b/CHANGES.rst index 62a76753..e90e7540 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,9 @@ The ASDF Standard is at v1.6.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Fix bug in ``asdftool diff`` for arrays within a list [#1672] +- For ``info`` and ``search`` show ``str`` representation of chi...
asdf-format__asdf-1716
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/reference.py:find_references" ], "edited_modules": [ "asdf/reference.py:find_references" ] }, "file": "asdf/reference.py" } ]
asdf-format/asdf
f64fdb83e8ec7accf11a41200d74d54603f0db2f
Tree containing `id` causes reference resolution failure. # Description of the problem The existence of a dictionary with a key `id` anywhere "higher" in the tree than a reference causes the reference to fail to resolve. # Example of the problem ```python import asdf other_tree = { 'thing': 42, } ...
diff --git a/CHANGES.rst b/CHANGES.rst index 556369e9..d02fdc48 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,9 @@ a file and ``AsdfPackageVersionWarning`` when installed extension/manifest package does not match that used to write the file [#1758] +- Fix bug where a dictionary containing a key ``id``...
asdf-format__asdf-1734
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/yamlutil.py:AsdfLoader.construct_yaml_omap" ], "edited_modules": [ "asdf/yamlutil.py:AsdfLoader" ] }, "file": "asdf/yamlutil.py" } ]
asdf-format/asdf
698bd30c45b5f55467d7fb745faf1f0060156d01
yaml has not attribute `ConstructorError` Attempts to raise `yaml.ConstructorError` are included in `asdf.yamlutil`. https://github.com/asdf-format/asdf/blob/45b166188b58f8516f07f3f4c3399c0a10e61377/asdf/yamlutil.py#L178 For yaml 6.0 (and perhaps other versions) the `ConstructorError` attribute does not exist. Howe...
diff --git a/asdf/yamlutil.py b/asdf/yamlutil.py index e4b1d504..e40588b5 100644 --- a/asdf/yamlutil.py +++ b/asdf/yamlutil.py @@ -175,7 +175,7 @@ class AsdfLoader(_yaml_base_loader): yield omap if not isinstance(node, yaml.SequenceNode): msg = "while constructing an ordered map" - ...
asdf-format__asdf-1739
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_node_info.py:NodeSchemaInfo.from_root_node" ], "edited_modules": [ "asdf/_node_info.py:NodeSchemaInfo" ] }, "file": "asdf/_node_info.py" } ]
asdf-format/asdf
2a073371f051fb514878d5ef7ec2d9e404872d0b
Objects that implement `__asdf_traverse__` are expected to have a `_tag` # Description of the problem Adding `__asdf_traverse__` to an object will cause `info` (and possibly other commands) to fail if the object does not also contain a `_tag` attribute. # Example of the problem ```python import asdf class ...
diff --git a/CHANGES.rst b/CHANGES.rst index 178ffea0..bb568140 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +3.3.0 (unreleased) +------------------ + +- Fix ``__asdf_traverse__`` for non-tagged objects [#1739] + 3.2.0 (2024-04-05) ------------------ diff --git a/asdf/_node_info.py b/asdf/_node_info.p...
asdf-format__asdf-1753
[ { "changes": { "added_entities": [ "asdf/_asdf.py:AsdfFile.set_array_save_base", "asdf/_asdf.py:AsdfFile.get_array_save_base" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "asdf/_asdf.py:AsdfFile" ] }, "file": "asdf/_as...
asdf-format/asdf
097dffa508859e7f8c7a335b53e52918c9debf41
Saving views results in saving the base array When asdf stores an array, it stores the [base array](https://github.com/asdf-format/asdf/blob/aca944af90ee3bc8112c714476bdcdc13a7e8d9c/asdf/core/_converters/ndarray.py#L111). This can result in unexpectedly large files like in the following example: ```python import as...
diff --git a/CHANGES.rst b/CHANGES.rst index 9b7e451c..14d855d1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,6 +24,11 @@ resolve to public classes (even if the class is implemented in a private module). [#1654] +- Add options to control saving the base array when saving array views + controlled via ``Asdf...
asdf-format__asdf-1758
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_asdf.py:AsdfFile._check_extensions", "asdf/_asdf.py:AsdfFile._update_extension_history" ], "edited_modules": [ "asdf/_asdf.py:AsdfFile" ] }, "file": "asdf...
asdf-format/asdf
d46fb6b3e327dfd4318891cf2c1cf39c5dd36222
Raise a warning type specific to software version mismatches when wrong version of packages is installed I would like to be able to convert the "you have a too old version of this converter package" warnings to errors in some situations, but the warning raised here: https://github.com/asdf-format/asdf/blob/7ae2d7eb198b...
diff --git a/CHANGES.rst b/CHANGES.rst index 0733fc3c..556369e9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,10 @@ - Deprecate ``asdf.util.filepath_to_url`` use ``pathlib.Path.to_uri`` [#1735] +- Record package providing manifest for extensions used to write + a file and ``AsdfPackageVersionWarning`` whe...
asdf-format__asdf-1797
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_asdf.py:AsdfFile.__init__", "asdf/_asdf.py:open_asdf" ], "edited_modules": [ "asdf/_asdf.py:AsdfFile", "asdf/_asdf.py:open_asdf" ] }, "file": "asd...
asdf-format/asdf
ac7b6de99f09f9f7215121ad2b575bbe824c2189
Deprecate `copy_arrays` As described in https://github.com/asdf-format/asdf/pull/1667 After asdf 3.1 is released deprecate `copy_arrays` (mentioning new `memmap` option).
diff --git a/CHANGES.rst b/CHANGES.rst index f9120e2f..2a441728 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -55,6 +55,7 @@ to allow lazy deserialization of ASDF tagged tree nodes to custom objects. [#1733] +- Deprecate ``copy_arrays`` in favor of ``memmap`` [#1797] 3.2.0 (2024-04-05) ------------------ di...
asdf-format__asdf-1803
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "asdf/_core/_converters/ndarray.py:NDArrayConverter.to_yaml_tree" ], "edited_modules": [ "asdf/_core/_converters/ndarray.py:NDArrayConverter" ] }, "file": "asdf/_core/_c...
asdf-format/asdf
33e7095df0c58705043de8f75497dfd64d04bbfb
masked arrays do not roundtrip with all false masks # Description of the problem Attempting to save a masked array with an all false mask results in no errors. Yet when loaded the array is no longer masked. See: https://github.com/asdf-format/asdf/blob/4a0064aa48d6360d27ab588b2bb85255016e3876/asdf/_core/_convert...
diff --git a/CHANGES.rst b/CHANGES.rst index 3a625fe3..acf53aaf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ 3.4.0 (unreleased) ------------------ -- +- Fix issue where roundtripping a masked array with no masked values removes the mask [#1803] 3.3.0 (2024-07-12) ------------------ diff --git a/as...
ashmastaflash__kal-wrapper-21
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "kalibrate/fn.py:build_kal_scan_band_string", "kalibrate/fn.py:build_kal_scan_channel_string", "kalibrate/fn.py:herz_me", "kalibrate/fn.py:determine_final_freq", "kalibrat...
ashmastaflash/kal-wrapper
52219f922914432ff03c4bfb3845cfc759cb18ea
Fix Py3 compat issue Lots of string vs bytes comparison issues.
diff --git a/kalibrate/fn.py b/kalibrate/fn.py index df44306..ac51a43 100644 --- a/kalibrate/fn.py +++ b/kalibrate/fn.py @@ -1,5 +1,6 @@ -from . import sanity +"""Utility functions for Kalibrate output paring.""" import decimal +from . import sanity @@ -18,11 +19,11 @@ def build_kal_scan_band_string(kal_bin, ban...
asmeurer__removestar-22
[ { "changes": { "added_entities": [ "removestar/removestar.py:is_noqa_comment_allowing_star_import" ], "added_modules": [ "removestar/removestar.py:is_noqa_comment_allowing_star_import" ], "edited_entities": [ "removestar/removestar.py:replace_imports" ...
asmeurer/removestar
0fc112d56de1a5f681cf9d6bc6d4399f7e2362f8
Support noqa comments See https://github.com/asmeurer/removestar/pull/19 Even if we don't support noqa, we should also fix the regex to match star import lines that end in a comment.
diff --git a/README.md b/README.md index 9d4f564..b2cf113 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,24 @@ optional arguments: (default: 100) ``` +## Whitelisting star imports + +`removestar` does not replace star import lines that are marked with +[Flake8 `noqa` comments][noqa-co...
asottile__add-trailing-comma-12
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "add_trailing_comma.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modul...
asottile/add-trailing-comma
49a0d757435b4962c58f8d4f48ba85c7f2f5256f
escaped newlines are throwing off indent detection This should be a noop: ```python x = y.\ foo( bar, ) ``` However, this is the current behaviour: ```diff x = y.\ foo( bar, - ) +) ``` Might need help from https://github.com/asottile/tokenize-rt/issues/1
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 7a571a7..882cb9d 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -7,6 +7,7 @@ import collections import io import sys +from tokenize_rt import ESCAPED_NL from tokenize_rt import src_to_tokens from tokenize_rt import Token from tok...
asottile__add-trailing-comma-154
[ { "changes": { "added_entities": [ "add_trailing_comma/_plugins/literals.py:_fix_tuple_py38" ], "added_modules": [ "add_trailing_comma/_plugins/literals.py:_fix_tuple_py38" ], "edited_entities": [ "add_trailing_comma/_plugins/literals.py:_fix_literal", ...
asottile/add-trailing-comma
d370e91067c0ee7f4a87b86e4f8f2c483fd59c21
Tool may change variables from type `T` to `tuple[T]` Hey, I found this while using this as a pre-commit hook (big fan of the the project & your tools btw! :)). It seems the tool may change turn a type into a tuple[type] in a situation like this; ```py x = ( object # < comma is added here ), object ```
diff --git a/add_trailing_comma/_plugins/literals.py b/add_trailing_comma/_plugins/literals.py index c5771be..53bdcf6 100644 --- a/add_trailing_comma/_plugins/literals.py +++ b/add_trailing_comma/_plugins/literals.py @@ -26,12 +26,11 @@ def _fix_literal( *, one_el_tuple: bool, ) -> None: - if toke...
asottile__add-trailing-comma-18
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_brace" ], "edited_modules": [ "add_trailing_comma.py:_fix_brace" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
f1666043a4ef3aabec4021acd8946b36209d546e
Blank lines may be considered as "minimum" indentation while unhugging They should be ignored, this currently introduces trailing whitespace: ```python x('foo', ( 'bar', 'baz', )) ```
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 0f86212..2884adf 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -271,7 +271,7 @@ def _fix_brace(fix_data, add_comma, tokens): indents = [] insert_indents = [] for i in range(first_brace + 3, last_brace): - ...
asottile__add-trailing-comma-20
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:FindNodes._visit_literal", "add_trailing_comma.py:FindNodes.visit_Tuple", "add_trailing_comma.py:FindNodes.visit_Call", "add_trailing_comma.py:FindNodes.vis...
asottile/add-trailing-comma
e6cfc6a9976fc305b0054b30995b5407fea833a5
Two iterations are required to resolve func(multi line string literal) ### input ```python f('long' 'literal') ``` ### output 1 ```python f( 'long' 'literal' ) ``` ### output 2 ```python f( 'long' 'literal', ) ``` This _should_ resolve in a single pass
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index d8f1939..9ef7e2f 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -64,16 +64,12 @@ class FindNodes(ast.NodeVisitor): self.literals = {} self.has_new_syntax = False - def _visit_literal(self, node, key='elts', is_mul...
asottile__add-trailing-comma-23
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:FindNodes.__init__", "add_trailing_comma.py:FindNodes.visit_Call", "add_trailing_comma.py:_fix_src" ], "edited_modules": [ "add_trailing_comma.p...
asottile/add-trailing-comma
47aa870cde65d699237d345df17bfb1ca03bd3f7
Regression f({}).y(...) is not adding commas Seems I broke this in 0.4.3 because now the first function is being considered: ```python f({}).y( x ) ``` should add a comma on the `x` line.
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 784e00b..da4d733 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -59,7 +59,8 @@ def _is_star_star_kwarg(node): class FindNodes(ast.NodeVisitor): def __init__(self): - self.calls = {} + # multiple calls can report th...
asottile__add-trailing-comma-25
[ { "changes": { "added_entities": [ "add_trailing_comma.py:_find_tuple" ], "added_modules": [ "add_trailing_comma.py:_find_tuple" ], "edited_entities": [ "add_trailing_comma.py:FindNodes._visit_literal", "add_trailing_comma.py:FindNodes.__init__", ...
asottile/add-trailing-comma
c7da498ebb0549a0925b8f4c3502d8fd27f554b8
Regression ({}, ()) is not adding a trailing comma Similar to #22 ```python ( {k: v}, () ) `` Is not adding a trailing comma after the second tuple
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index da4d733..70cb166 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -63,11 +63,12 @@ class FindNodes(ast.NodeVisitor): self.calls = collections.defaultdict(list) self.funcs = {} self.literals = {} + self.tu...
asottile__add-trailing-comma-28
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_src" ], "edited_modules": [ "add_trailing_comma.py:_fix_src" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
3343fe9ba1b396342d27a73fafa88807b47fc254
AssertionError on valid syntax ```python with a: pass [b] = {1} ``` produces this error with add-trailing-comma version 0.5.1: ``` Traceback (most recent call last): File "/nail/home/ckuehl/.pre-commit/repo3dPrz7/py_env-python2.7/bin/add-trailing-comma", line 9, in <module> load_entry_point('a...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 926f9de..2e71af5 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -325,6 +325,9 @@ def _fix_src(contents_text, py35_plus, py36_plus): tokens = src_to_tokens(contents_text) for i, token in _changing_list(tokens): + # DED...
asottile__add-trailing-comma-30
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_src" ], "edited_modules": [ "add_trailing_comma.py:_fix_src" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
47e21e155b0ad8893638a4b8959e1c3af8e79544
Tuple/list split across lines gets rewritten to invalid syntax ``` x = ([a, b], None) ``` gets rewritten to this: ``` x = ( [ a, b, ], , None ) ``` which is invalid syntax: ``` File "test.py", line 6 , None ^ ...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 2e71af5..006dfe8 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -347,16 +347,18 @@ def _fix_src(contents_text, py35_plus, py36_plus): elif key in visitor.literals: fixes.append((True, _find_simple(i, tokens))) - ...
asottile__add-trailing-comma-34
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_src" ], "edited_modules": [ "add_trailing_comma.py:_fix_src" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
bd9cb3fdaecb61b016162d2071de2cf0ef631eaa
autopep8 and add-trailing-comma fight over indentation Here's an (admittedly poorly-formatted) reproduction. FWIW I prefer add-trailing-comma's approach, but curious to hear your thoughts. This is obviously weird indentation but ideally they wouldn't fight. Do we need to make autopep8 smarter? ## what add-trailing-c...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 006dfe8..846894c 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -341,11 +341,11 @@ def _fix_src(contents_text, py35_plus, py36_plus): add_comma = not func.star_args or py36_plus # functions can be treated as ca...
asottile__add-trailing-comma-4
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_call" ], "edited_modules": [ "add_trailing_comma.py:_fix_call" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
9ce37f20c644269487c52030912e20a75cc191c1
"IndexError: pop from empty list" when processing valid file (Wasn't sure how to describe this scenario better, sorry for the lame title.) Here's a fairly minimal example: ```python ( a ).thing(b) ``` Produces an error when processing with add-trailing-comma v0.2.0: ```python Traceback (most recent...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 9efea83..736fa7d 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -179,13 +179,16 @@ def _fix_call(call, i, tokens): # # func_name(arg, arg, arg) # ^ outer paren + brace_start, brace_end = '(', ')' ...
asottile__add-trailing-comma-53
[ { "changes": { "added_entities": [ "add_trailing_comma.py:FindNodes.visit_ImportFrom", "add_trailing_comma.py:_find_import" ], "added_modules": [ "add_trailing_comma.py:_find_import" ], "edited_entities": [ "add_trailing_comma.py:FindNodes.__init__",...
asottile/add-trailing-comma
35ce9905dc9422e354c37fe5a941dc8198de4d56
Doesn't add trailing commas to imports I would expect this to add trailing commas to multiple imports: ```python from foo import ( bar, baz, ) ```
diff --git a/README.md b/README.md index 8b8e86d..995826f 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,16 @@ following change: Note that this would cause a **`SyntaxError`** in earlier python versions. +### trailing commas for `from` imports + +```diff + from os import ( + path, +- makedirs ++ m...
asottile__add-trailing-comma-71
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "add_trailing_comma.py:_fix_brace" ], "edited_modules": [ "add_trailing_comma.py:_fix_brace" ] }, "file": "add_trailing_comma.py" } ]
asottile/add-trailing-comma
36792566ac51d63a744c23a26d4d27b1ae7bc8a6
False negative with statement ending with parens ```python if (foo and bar()): pass ``` I expect to be rewritten to ```python if ( foo and bar() ): pass ``` But I imagine the same code that prevents this from being rewritten is firing: ```python foo('bar {}'.format( 'baz'...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 9eaa33f..34e1012 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -271,7 +271,7 @@ def _fix_brace(fix_data, add_comma, tokens): # Don't unhug single element things with a multi-line component # inside. ...
asottile__add-trailing-comma-8
[ { "changes": { "added_entities": [ "add_trailing_comma.py:_find_simple", "add_trailing_comma.py:_find_call", "add_trailing_comma.py:_find_literal", "add_trailing_comma.py:_fix_comma_and_unhug" ], "added_modules": [ "add_trailing_comma.py:_find_simple", ...
asottile/add-trailing-comma
8d87f678b13ac1497b688173e94d21d8371746dc
microbug: `def f(*args):` and `f(*args)` are not unhugged ### minimal example ```python def f( *args): pass f( *args) ``` ### expected ```python def f( *args ): pass f( *args ) ``` ### actual no change ### explain these two types are pruned during the trailing comma...
diff --git a/add_trailing_comma.py b/add_trailing_comma.py index 49e98c7..bd16709 100644 --- a/add_trailing_comma.py +++ b/add_trailing_comma.py @@ -15,9 +15,10 @@ from tokenize_rt import UNIMPORTANT_WS Offset = collections.namedtuple('Offset', ('line', 'utf8_byte_offset')) Call = collections.namedtuple('Call', ('n...