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
airtai__fastagency-83
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "fastagency/studio/models/llms/openai.py:OpenAIAPIKey.validate_api_key" ], "edited_modules": [ "fastagency/studio/models/llms/openai.py:OpenAIAPIKey" ] }, "file": "fasta...
airtai/fastagency
b55c3e2910453314579bd30c27784276b188d6f5
Add new validation for OpenAI API key
diff --git a/fastagency/studio/models/llms/openai.py b/fastagency/studio/models/llms/openai.py index 83462078..adfb1912 100644 --- a/fastagency/studio/models/llms/openai.py +++ b/fastagency/studio/models/llms/openai.py @@ -55,7 +55,10 @@ class OpenAIAPIKey(Model): @field_validator("api_key") @classmethod ...
aiven__aiven-client-247
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "aiven/client/cli.py:AivenCLI.get_project" ], "edited_modules": [ "aiven/client/cli.py:AivenCLI" ] }, "file": "aiven/client/cli.py" } ]
aiven/aiven-client
f5432a3d2ae452fb3e2d7ba2e5f56c20f9533688
Error quote_from_bytes() # What happened? Ran the following command and got the error `avn --auth-token $AIVEN_USER_TOKEN service list` ``` Traceback (most recent call last): File "/usr/bin/avn", line 8, in <module> sys.exit(main()) File "/usr/lib/python3.8/site-packages/aiven/client/__main__.py", line 5...
diff --git a/aiven/client/cli.py b/aiven/client/cli.py index 68bc4eb..2c0cb84 100644 --- a/aiven/client/cli.py +++ b/aiven/client/cli.py @@ -298,7 +298,12 @@ class AivenCLI(argx.CommandLineTool): """Return project given as cmdline argument or the default project from config file""" if getattr(self.arg...
akaihola__darker-238
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/__main__.py:format_edited_parts", "src/darker/__main__.py:_isort_and_blacken_single_file", "src/darker/__main__.py:_blacken_single_file" ], "edited_modules": [ ...
akaihola/darker
262d028cc2520f37027f98db9bbdc5b0e7538054
`--isort` sorts imports even if they were not edited The problem with applying isort modifications "surgically" is in the fact that isort may (and often does) change the order of lines. Could we consider all changes by isort as one contiguous diff chunk, and apply it if any line in `edited_linenums` falls inside tha...
diff --git a/CHANGES.rst b/CHANGES.rst index bb19e24..9bd0616 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,9 @@ Added - The ``--workers``/``-W`` option now specifies how many Darker jobs are used to process files in parallel to complete reformatting/linting faster. - Linters can now be installed and run i...
akaihola__darker-313
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "action/main.py" } ]
akaihola/darker
eef95714ea1c1364aeb356ee8879cd5b4a95e64e
Add option to add linters (flake8, mypy, etc.) in the GH Action There is no other way to add the supported linters other than creating separate steps to install.
diff --git a/.bandit.code.yaml b/.bandit.code.yaml index 2656ce2..a356e95 100644 --- a/.bandit.code.yaml +++ b/.bandit.code.yaml @@ -5,3 +5,4 @@ targets: . exclude_dirs: - ./src/darker/tests + - ./action/tests diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml index 854169d..5479305 100644 -...
akaihola__darker-349
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "action/main.py" } ]
akaihola/darker
0d835953c960bf9f63301de5a0e1dd2a67c7a210
Allow pinning linter packages in the GitHub Action To keep GitHub workflows stable, users may want to pin both Darker and linter packages to fixed versions when using the GitHub Action. Darker can already be pinned using the `version:` option, but linter pinning wasn't yet added in #313. # Alternatives for the synta...
diff --git a/CHANGES.rst b/CHANGES.rst index 9d86b75..4656aaf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,7 +7,7 @@ Added ----- - The ``--jobs`` option now specifies how many Darker jobs are used to process files in parallel to complete reformatting/linting faster. -- Linters can now be run in the GitHub Acti...
akaihola__darker-393
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/__main__.py:main" ], "edited_modules": [ "src/darker/__main__.py:main" ] }, "file": "src/darker/__main__.py" }, { "changes": { "added_entities"...
akaihola/darker
8e5a6e48dd1c0b31c69ea00e442316404e1ad45f
Track distant side effects of changes by doing an extra baseline run for linters **Problem:** Darker only shows linter erros on modified lines. But e.g. when correcting a function signature, `mypy` easily finds the static typing errors in invocations on unmodified lines elsewhere in the same or other `.py` files. **...
diff --git a/CHANGES.rst b/CHANGES.rst index 268e129..ba73f00 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,10 @@ Added ``--target-version`` command line option - In ``README.rst``, link to GitHub searches which find public repositories that use Darker. +- Linters are now run twice: once for ``rev1`` t...
akaihola__darker-494
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/config.py:validate_stdin_src" ], "edited_modules": [ "src/darker/config.py:validate_stdin_src" ] }, "file": "src/darker/config.py" } ]
akaihola/darker
5dfb1b76c3f87cda18f492b1c2f48fa5499fc59a
`-` as source file not allowed when using the `--stdin-filename` option (unlike in Black) <!-- NOTE: To ask for help using Darker, please use Discussions (see the top of this page). This form is only for reporting bugs. --> **Describe the bug** I have the Black Formatter extension and configu...
diff --git a/CHANGES.rst b/CHANGES.rst index 745bcf7..1e4f29a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ These features will be included in the next release: Added ----- +- Allow ``-`` as the single source filename when using the ``--stdin-filename`` option. + This makes the option compatible with ...
akaihola__darker-499
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/linting.py:_get_messages_from_linters_for_baseline" ], "edited_modules": [ "src/darker/linting.py:_get_messages_from_linters_for_baseline" ] }, "file": "src/...
akaihola/darker
e34932fdeb1eb2643d136ced26515cd0b4c81c4d
mypy fails with "baseline-revision is not a valid Python package name" in the baseline worktree if the git repo toplevel contains __init__.py **Describe the bug** If the top-level of a git repo has an `__init__.py` in it, then the step that does ```shell git worktree add --quiet --force --force /tmp/tmpF00/baselin...
diff --git a/CHANGES.rst b/CHANGES.rst index fe4a4fa..acd1927 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ Fixed - Revert running ``commit-range`` from the repository itself. This broke the GitHub action. - Python 3.12 compatibility in multi-line string scanning. +- Use the original repository work...
akaihola__darker-503
[ { "changes": { "added_entities": [ "src/darker/config.py:convert_config_characters", "src/darker/config.py:convert_hyphens_to_underscores", "src/darker/config.py:convert_underscores_to_hyphens", "src/darker/config.py:validate_config_keys" ], "added_modules": [ ...
akaihola/darker
ddcd430663c3a980ceb408ee05b7c90ba875d71b
`pyproject.toml` options with hyphens are ignored **Describe the bug** It seems that Darker ignores config options in `pyproject.toml` if they are spelled using hyphens instead of underscores. **To Reproduce** I have configuration for a Darker pre-commit hook like this: ```yaml - repo: https://github.com/aka...
diff --git a/CHANGES.rst b/CHANGES.rst index 7bf6857..9f66213 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -52,6 +52,10 @@ Fixed - Linting fixes: Use ``stacklevel=2`` in ``warnings.warn()`` calls as suggested by Flake8; skip Bandit check for virtualenv creation in the GitHub Action; use ``ignore[method-assign]`...
akaihola__darker-545
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/git.py:_git_diff_name_only" ], "edited_modules": [ "src/darker/git.py:_git_diff_name_only" ] }, "file": "src/darker/git.py" } ]
akaihola/darker
720297a36952352cd249155461f7ae9b0f45de3e
Add option to ignore moved/deleted files **Is your feature request related to a problem? Please describe.** It should be possible to ignore moved or deleted files when determining if they should be formatted. We only care about formatting if code as been touched inside the file, not if the file has been moved or delet...
diff --git a/CHANGES.rst b/CHANGES.rst index 4d2af14..4eeaef0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,7 @@ Added - New exit codes 2 for file not found, 3 for invalid command line arguments, 4 for missing dependencies and 123 for unknown failures. - Display exit code in parentheses after error message...
akaihola__darker-568
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/command_line.py:make_argument_parser" ], "edited_modules": [ "src/darker/command_line.py:make_argument_parser" ] }, "file": "src/darker/command_line.py" },...
akaihola/darker
c70c7fa72d25b4c750af298e1b54b254a668aece
Option to choose formatter, Black as default There are feature requests for - using Ruff or Blue instead of Black as the formatter - #521 - #251 - just running isort and/or flynt but no formatter at all - #304 For these, a command line and configuration option for choosing (or omitting) the formatter is n...
diff --git a/CHANGES.rst b/CHANGES.rst index 2c4a937..e69f730 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,8 @@ Added - The ``--preview`` configuration flag is now supported in the configuration files for Darker and Black - Prevent Pylint from updating beyond version 3.2.7 due to dropped Python 3.8 supp...
akaihola__darker-584
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/darker/__main__.py:main" ], "edited_modules": [ "src/darker/__main__.py:main" ] }, "file": "src/darker/__main__.py" }, { "changes": { "added_entities"...
akaihola/darker
b2360a61274f2455790aa81e97fac9a3827e24fd
Relative path in a repo subdirectory not found when using hash symmetric difference <!-- NOTE: To ask for help using Darker, please use Discussions (see the top of this page). This form is only for reporting bugs. --> **Describe the bug** Relative path in a repo subdirectory not found when us...
diff --git a/CHANGES.rst b/CHANGES.rst index 92c84ff..74ed0f3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -21,6 +21,7 @@ Fixed ``--stdout`` option. This makes the option compatible with the `new Black extension for VSCode`__. - Badge links in the README on GitHub. +- Handling of relative paths and running from...
akaihola__darker-591
[ { "changes": { "added_entities": [ "action/main.py:set_github_output", "action/main.py:exit_with_exitcode", "action/main.py:pip_install" ], "added_modules": [ "action/main.py:set_github_output", "action/main.py:exit_with_exitcode", "action/main.p...
akaihola/darker
1a77306c8b083a24da333af58b4538946933755e
Darker github action ignores `working-directory` - [x] Add GitHub Workflow which adds as a functional test for this <!-- NOTE: To ask for help using Darker, please use Discussions (see the top of this page). This form is only for reporting bugs. --> **Describe the bug** Darker github actio...
diff --git a/CHANGES.rst b/CHANGES.rst index 3b92b56..449bf32 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -45,6 +45,7 @@ Fixed The work-around should be removed when Python 3.8 and 3.9 are no longer supported. - Add missing configuration flag for Flynt_. - Only split source code lines at Python's universal newli...
akaihola__darker-746
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "src/darker/config.py:DarkerConfig" ] }, "file": "src/darker/config.py" } ]
akaihola/darker
05fdba2826914463566c31b75227df01c69acee4
darkgraylib.config.ConfigurationError: Invalid [tool.darker] keys in pyproject.toml: flynt <!-- NOTE: To ask for help using Darker, please use Discussions (see the top of this page). This form is only for reporting bugs. --> **Describe the bug** Like the title says, `[tool.darker]` configurat...
diff --git a/CHANGES.rst b/CHANGES.rst index 9f03adf..e650639 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,7 +20,7 @@ Added - Invoking Black is now implemented as a plugin. This allows for easier integration of other formatters in the future. There's also a dummy ``none`` formatter plugin. - ``--formatter=non...
akolar__ogn-lib-10
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Spot._parse_protocol_specific" ], "added_modules": [ "ogn_lib/parser.py:Spot" ], "edited_entities": null, "edited_modules": null }, "file": "ogn_lib/parser.py" } ]
akolar/ogn-lib
4526578e5fe7e897c6e0f08edfa180e75e88203f
Implement parser for Spot messages (OGSPOT)
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index f43f6cb..a2ca7ea 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -627,3 +627,33 @@ class ServerParser(Parser): """ return {'comment': comment} + + +class Spot(Parser): + """ + Parser for Spot-formatted APRS messages. + """ +...
akolar__ogn-lib-11
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Spider._parse_protocol_specific" ], "added_modules": [ "ogn_lib/parser.py:Spider" ], "edited_entities": [ "ogn_lib/parser.py:Spot._parse_protocol_specific" ], "edited_modules": [ "ogn_...
akolar/ogn-lib
5ab4b003315931c1d1f1ac3a9e29532305aa5fff
Implement parser for Spider messages (OGSPID)
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index a2ca7ea..00093ea 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -629,31 +629,32 @@ class ServerParser(Parser): return {'comment': comment} -class Spot(Parser): +class Spider(Parser): """ - Parser for Spot-formatted APRS messages. +...
akolar__ogn-lib-12
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Skylines._parse_protocol_specific" ], "added_modules": [ "ogn_lib/parser.py:Skylines" ], "edited_entities": null, "edited_modules": null }, "file": "ogn_lib/parser.py" } ]
akolar/ogn-lib
8321ac10ba83ecf6566956b001b0644c34c7bdf9
Implement parser for Skylines messages (OGSKYL)
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index abbe761..4df961f 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -686,3 +686,31 @@ class Spider(Parser): 'spider_id': fields[2], 'gps_status': fields[3] } + + +class Skylines(Parser): + """ + Parser for Spider-fo...
akolar__ogn-lib-13
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:LiveTrack24._parse_protocol_specific" ], "added_modules": [ "ogn_lib/parser.py:LiveTrack24" ], "edited_entities": null, "edited_modules": null }, "file": "ogn_lib/parser.py" } ]
akolar/ogn-lib
dd7b9bf33caee17a839240a134246881e9c7c32f
Implement parser for LiveTrack24 messages (OGLT24)
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index 4df961f..e50eb80 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -714,3 +714,32 @@ class Skylines(Parser): 'id': fields[0], 'vertical_speed': int(fields[1][:3]) * FEET_TO_METERS } + + +class LiveTrack24(Parser): + "...
akolar__ogn-lib-16
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Parser._preprocess_message", "ogn_lib/parser.py:Capturs._preprocess_message" ], "added_modules": [ "ogn_lib/parser.py:Capturs" ], "edited_entities": [ "ogn_lib/parser.py:Parser.parse_message" ...
akolar/ogn-lib
b2b444e1a990e6e84f09b76d93505c2bd9ed2bf5
Implement parser for Capturs messages (OGCAPT)
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index 0546bbb..4ae680a 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -153,6 +153,8 @@ class Parser(metaclass=ParserBase): using Parser.PATTERN_ALL """ + raw_message = cls._preprocess_message(raw_message) + match = cls...
akolar__ogn-lib-18
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "ogn_lib/parser.py:Capturs" ] }, "file": "ogn_lib/parser.py" } ]
akolar/ogn-lib
fb920126739e2ac5dba17b6dd14b718b1952090f
Capturs parser has invalid callsign Capturs parser is registered using OGLT24 instead of OGCAPT.
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index 4ae680a..f3b51ae 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -773,7 +773,7 @@ class LiveTrack24(Parser): class Capturs(Parser): - __destto__ = ['OGLT24', 'OGLT24-1'] + __destto__ = ['OGCAPT', 'OGCAPT-1'] @staticmethod def _pre...
akolar__ogn-lib-21
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Fanet._parse_protocol_specific" ], "added_modules": [ "ogn_lib/parser.py:Fanet" ], "edited_entities": null, "edited_modules": null }, "file": "ogn_lib/parser.py" } ]
akolar/ogn-lib
695f77174bd5a1ef7bdba53c03e3e905aaaec521
Add support for Fanet (OGNFNT) See https://github.com/glidernet/ogn-aprs-protocol/pull/5/commits/1be92993c4d50db4329371d18385a29782ddc4fa for detailed message format.
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index f3b51ae..5842f01 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -778,3 +778,44 @@ class Capturs(Parser): @staticmethod def _preprocess_message(message): return message.strip('/') + + +class Fanet(Parser): + """ + Parser for Fan...
akolar__ogn-lib-9
[ { "changes": { "added_entities": [ "ogn_lib/parser.py:Parser._parse_digipeaters", "ogn_lib/parser.py:Parser._parse_heading_speed", "ogn_lib/parser.py:Parser._parse_altitude", "ogn_lib/parser.py:Parser._parse_protocol_specific", "ogn_lib/parser.py:APRS._parse_protoco...
akolar/ogn-lib
a78134bedadbeba05ef3c4a514dd205fcd80300a
Rewrite parser engine in regex Rewrite all parser functions that use string manipulation for parsing messages and replace them with regular expressions. Advantages include: - more robust and extendable - faster than the current implementation
diff --git a/ogn_lib/parser.py b/ogn_lib/parser.py index 4373711..f43f6cb 100644 --- a/ogn_lib/parser.py +++ b/ogn_lib/parser.py @@ -1,6 +1,7 @@ import collections import functools import logging +import re from datetime import datetime, time, timedelta from ogn_lib import constants, exceptions @@ -43,6 +44,8 @@...
akrherz__pyWWA-46
[ { "changes": { "added_entities": [ "parsers/pywwa/__init__.py:load_config" ], "added_modules": [ "parsers/pywwa/__init__.py:load_config" ], "edited_entities": null, "edited_modules": null }, "file": "parsers/pywwa/__init__.py" } ]
akrherz/pyWWA
ee87af70f179b8e47af5e5600bf8f650fdb1ba29
Allow installed pywwa to find settings.json Presently, if `pywwa` is installed into the python environment, the code that loads the `settings.json` file will fail due to confused paths. Will need to boggle how to do this.
diff --git a/README.md b/README.md index 9e730fb..a6b935c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,18 @@ This repository is an integration of [pyIEM backed](https://github.com/akrherz/p Python 3.6+ is required to use this code. +Installation +------------ + +An opinionated installation is to clone this re...
alanmcruickshank__sqlfluff-188
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": [ "src/sqlfluff/dialects/dialect_ansi.py:SelectTargetElementSegment" ] }, "file": "src/sqlfluff/dialects/dialect_ansi.py" } ]
alanmcruickshank/sqlfluff
e456a4b67d16a0cb2b38c978e3dd0b91be2ce31a
PRS Error: Found unparsable segment @L001P008: 'a.b.*...' SQL query to reproduce: ```sql SELECT a.b.* FROM t ```
diff --git a/docs/requirements.txt b/docs/requirements.txt index 20c2b820..0e7760be 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ # Requirements for building docs -sphinx==2.4.1 +sphinx==2.3.1 sphinx-click doc8 diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/di...
alanmcruickshank__sqlfluff-231
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "src/sqlfluff/dialects/dialect_ansi.py" } ]
alanmcruickshank/sqlfluff
d10ea3fdb524f7b0363e99ae710aee679d837300
Bogus capitalization warning involving SAFE_CAST, NULL, and AS Input #1 : ``` SELECT SAFE_CAST(NULL AS STRING) AS age_label FROM `table` ``` Input #2: ``` SELECT NULL AS age_label FROM `table` ``` Either of these files results in a similar warning: ``` $ sqlfluff lint --exclude-rules...
diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py index 5834c196..4432b171 100644 --- a/src/sqlfluff/dialects/dialect_ansi.py +++ b/src/sqlfluff/dialects/dialect_ansi.py @@ -89,7 +89,7 @@ ansi_dialect.add( # also use a regex to explicitly exclude disallowed keywords. N...
alanmcruickshank__sqlfluff-262
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/sqlfluff/parser/lexer.py:SingletonMatcher._trim" ], "edited_modules": [ "src/sqlfluff/parser/lexer.py:SingletonMatcher" ] }, "file": "src/sqlfluff/parser/lexer.py" ...
alanmcruickshank/sqlfluff
8618eedb6a986dc873fbff5c14709fe0e07cd0e8
FileSegment error raised when using tabs Hey, I got the following error: TypeError: In constructing <class 'sqlfluff.parser.segments_file.FileSegment'>, found an element of the segments tuple which isn't contigious with previous: <whitespace_RawSegment: ([4](1, 2, 2)) '\t'> > <newline_RawSegment: ([4](1, 2, 2)) '\n...
diff --git a/src/sqlfluff/parser/lexer.py b/src/sqlfluff/parser/lexer.py index 1eb4da37..ebbcb859 100644 --- a/src/sqlfluff/parser/lexer.py +++ b/src/sqlfluff/parser/lexer.py @@ -69,6 +69,10 @@ class SingletonMatcher: ) idx = trim_span[1] cont_pos_buff = co...
alanmcruickshank__sqlfluff-298
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/sqlfluff/cli/commands.py:lint", "src/sqlfluff/cli/commands.py:fix" ], "edited_modules": [ "src/sqlfluff/cli/commands.py:lint", "src/sqlfluff/cli/commands.py:fix" ...
alanmcruickshank/sqlfluff
2931c3a0bdeea4588751db964c28a74f34628081
Error using diff-quality with deleted files When running `diff-quality --violations sqlfluff` pre-commit when I have a file staged that has been deleted I get the following error ``` Quality tool not installed: 'sqlfluff' ``` Digging into this a little bit more, the code actually breaks in the sqlfluff linter.py ...
diff --git a/.gitignore b/.gitignore index 4899559b..eee1fe42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -# Ignore VSCode +# Ignore IDE files .vscode +.idea # Ignore Python cache and prebuilt things .cache diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py index edb81563....
alanmcruickshank__sqlfluff-307
[ { "changes": { "added_entities": null, "added_modules": [ "src/sqlfluff/rules/std.py:Rule_L030" ], "edited_entities": null, "edited_modules": null }, "file": "src/sqlfluff/rules/std.py" } ]
alanmcruickshank/sqlfluff
ec833c1b8931b0f7d42917e5813926d73e62db7c
Are functions not treated as keywords ? Not an issue, more like a question. With ``` [sqlfluff:rules:L010] capitalisation_policy = lower ``` using sqlfluff fix --rules L010 on ```sql SELECT MAX(id) from table ``` becomes ```sql select MAX(id) from table ``` Shouldn't `MAX` be also lower cased ?
diff --git a/src/sqlfluff/rules/std.py b/src/sqlfluff/rules/std.py index a11d1cd1..135be2a4 100644 --- a/src/sqlfluff/rules/std.py +++ b/src/sqlfluff/rules/std.py @@ -2101,3 +2101,18 @@ class Rule_L029(BaseCrawler): # Actually lint if segment.raw.upper() in dialect.sets('unreserved_keywords'):...
alanmcruickshank__sqlfluff-336
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/sqlfluff/cli/commands.py:fix" ], "edited_modules": [ "src/sqlfluff/cli/commands.py:fix" ] }, "file": "src/sqlfluff/cli/commands.py" } ]
alanmcruickshank/sqlfluff
27e052ab5f2c98be68fc86af61f9e5b7acc42910
Fix from stdin writes more than the fixed sql to stdout When it was originally written, fixing from stdin printed the fixed sql to stdout and noting else. That way you could do things like ```sh echo ' select * from t' | sqlfluff fix - --rules L003 > fixed.sql ``` At least in 0.3.3, a lint result gets printed ou...
diff --git a/src/sqlfluff/cli/commands.py b/src/sqlfluff/cli/commands.py index 88fa54a9..d16999b7 100644 --- a/src/sqlfluff/cli/commands.py +++ b/src/sqlfluff/cli/commands.py @@ -205,7 +205,7 @@ def fix(force, paths, **kwargs): be interpreted like passing the current working directory as a path argument. """ ...
alanmcruickshank__sqlfluff-93
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/sqlfluff/rules/std.py:Rule_L010._eval" ], "edited_modules": [ "src/sqlfluff/rules/std.py:Rule_L010" ] }, "file": "src/sqlfluff/rules/std.py" } ]
alanmcruickshank/sqlfluff
c390b493bea0afd3a996ba30bcf4d5032bb85022
Bug: fix ValueError: Unexpected capitalisation policy: 'inconsistent' I don't even know what is happening here! ``` ➜ sqlfluff version 0.2.4 ➜ echo 'selECT * from table;' > test.sql ➜ sqlfluff fix test.sql --rules L001,L002,L0...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 654a7d54..2f59106b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Fixed the "inconsistent" bug in L010. Thanks [@nolanbconaway](https://gi...
albertyw__git-browse-16
[ { "changes": { "added_entities": [ "git_browse/browse.py:GithubHost.commit_hash_url", "git_browse/browse.py:FocusObject.is_commit_hash", "git_browse/browse.py:FocusHash.__init__", "git_browse/browse.py:FocusHash.is_commit_hash", "git_browse/browse.py:get_commit_hash...
albertyw/git-browse
9cd501dba9d2d65a6a25265023a1befd253a620c
Support git browsing a commit hash
diff --git a/git_browse/browse.py b/git_browse/browse.py index 08673cd..80c7886 100755 --- a/git_browse/browse.py +++ b/git_browse/browse.py @@ -36,12 +36,21 @@ class GithubHost(object): self.user, self.repository ) + if focus_object.is_commit_hash(): + return self.c...
albertyw__git-browse-39
[ { "changes": { "added_entities": [ "git_browse/browse.py:SourcegraphHost.__init__", "git_browse/browse.py:SourcegraphHost.create", "git_browse/browse.py:SourcegraphHost.get_url", "git_browse/browse.py:SourcegraphHost.commit_hash_url", "git_browse/browse.py:Sourcegra...
albertyw/git-browse
f8acdd38d1c28524e0ba5f2c44fdd472bfccb1d7
Support opening git objects in uber sourcegraph Files: https://sourcegraph.uberinternal.com/code.uber.internal/path/to/repo/-/blob/path/to/file Repositories: https://sourcegraph.uberinternal.com/code.uber.internal/path/to/repo/ Commits: https://sourcegraph.uberinternal.com/code.uber.internal/path/to/repo/-/commit/com...
diff --git a/git_browse/browse.py b/git_browse/browse.py index 6a71221..bde7c54 100755 --- a/git_browse/browse.py +++ b/git_browse/browse.py @@ -15,15 +15,19 @@ import webbrowser __version__ = '2.6.0' +GITHUB_HOST = '(?P<host>github\.com)' +UBER_HOST = '(?P<host>code\.uber\.internal)' +UBER_CONFIG_HOST = '(?P<host...
albertyw__git-browse-49
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "git_browse/browse.py:get_git_url" ], "edited_modules": [ "git_browse/browse.py:get_git_url" ] }, "file": "git_browse/browse.py" } ]
albertyw/git-browse
ee46082dd3dea8fbaa3148d67c26004f5b1f2b6b
Support running with multiple fetch configs gitconfig allows for multiple fetch configs which breaks configparser: https://stackoverflow.com/questions/15507264/can-i-specify-in-git-config-to-fetch-multiple-refspecs
diff --git a/git_browse/browse.py b/git_browse/browse.py index 47ccaeb..451f605 100755 --- a/git_browse/browse.py +++ b/git_browse/browse.py @@ -369,7 +369,8 @@ def get_git_config() -> str: def get_git_url(git_config_file: str) -> str: - config = configparser.ConfigParser() + # strict is removed here because...
albertyw__git-browse-65
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "git_browse/sourcegraph.py:SourcegraphHost.get_url" ], "edited_modules": [ "git_browse/sourcegraph.py:SourcegraphHost" ] }, "file": "git_browse/sourcegraph.py" } ]
albertyw/git-browse
063f2a5e8e199f927b413191d991b381a00e79a5
Support sg.uberinternal.com Instead of `https://sourcegraph.uberinternal.com/code.uber.internal/<repo_namespace>/<repo_name>` Use `https://sg.uberinternal.com/code.uber.internal/uber-code/<repo_namespace>-<repo_name>`
diff --git a/git_browse/sourcegraph.py b/git_browse/sourcegraph.py index 0b6bb06..404364a 100644 --- a/git_browse/sourcegraph.py +++ b/git_browse/sourcegraph.py @@ -4,7 +4,7 @@ from git_browse import phabricator, typedefs PUBLIC_SOURCEGRAPH_URL = "https://sourcegraph.com/" -UBER_SOURCEGRAPH_URL = "https://sourcegr...
albertyw__git-reviewers-30
[ { "changes": { "added_entities": [ "git_reviewers/reviewers.py:FindHistoricalReviewers.get_changed_files" ], "added_modules": [ "git_reviewers/reviewers.py:FindHistoricalReviewers" ], "edited_entities": [ "git_reviewers/reviewers.py:FindLogReviewers.get_chan...
albertyw/git-reviewers
c3a916e554a058e3e3e3527f5692d0efed97ed83
Make git-reviewers work with commits that only add new files Read reviewers from entire repository history
diff --git a/git_reviewers/reviewers.py b/git_reviewers/reviewers.py index e4eee15..77ec78e 100755 --- a/git_reviewers/reviewers.py +++ b/git_reviewers/reviewers.py @@ -101,6 +101,18 @@ class FindLogReviewers(FindFileLogReviewers): """ Find the changed files between current status and master """ git_d...
albumentations-team__albumentations-1055
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/core/composition.py:BaseCompose.__init__", "albumentations/core/composition.py:OneOf.__init__", "albumentations/core/composition.py:SomeOf.__init__", "albumentatio...
albumentations-team/albumentations
6741f516672f559eb6a4a9ebe521b43065426341
`A.Compose`, `A.Sequential` components run multiple times inside of `A.OneOf` ## 🐛 Bug Hi, I used `A.OneOf` method on my `A.Compose` objects, but when I run entire pipeline, all components of `A.Compose` objects are called altogether. ## To Reproduce Steps to reproduce the behavior: 1. define augmenta...
diff --git a/albumentations/core/composition.py b/albumentations/core/composition.py index 7a78e43..d9f53c4 100644 --- a/albumentations/core/composition.py +++ b/albumentations/core/composition.py @@ -48,6 +48,12 @@ def get_always_apply(transforms: typing.Union["BaseCompose", TransformsSeqType]) class BaseCompose(me...
albumentations-team__albumentations-1064
[ { "changes": { "added_entities": [ "albumentations/augmentations/transforms.py:RingingOvershoot.__init__", "albumentations/augmentations/transforms.py:RingingOvershoot.__check_values", "albumentations/augmentations/transforms.py:RingingOvershoot.get_params", "albumentations...
albumentations-team/albumentations
7cf53fd919f5ad70adabdbcaf8ad9be60909aeb7
Feature request: Add augmentation to mimic ringing and overshoot artefacts. ## Feature description Ringing artifacts often appear as spurious edges near sharp transitions in an image. They visually look like bands or “ghosts” near edges. Overshoot artifacts are usually combined with ringing artifacts, which manifes...
diff --git a/README.md b/README.md index 07e9c39..5e8764f 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ Pixel-level transforms will change just an input image and will leave any additi - [RandomSnow](https://albumentations.ai/docs/api_reference/augmentations/transforms/#albumentations.augmentations.transf...
albumentations-team__albumentations-1193
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/augmentations/crops/transforms.py:CropNonEmptyMaskIfExists.update_params" ], "edited_modules": [ "albumentations/augmentations/crops/transforms.py:CropNonEmptyMaskIfEx...
albumentations-team/albumentations
fe856c2a80fee6b6b31d255697c0f5fb6b96dc95
`CropNonEmptyMaskIfExists` modifies first `mask` contained in `masks` ## 🐛 Bug When applied to `masks`, `CropNonEmptyMaskIfExists` changes the first element of `masks` via the in-place comparison `|=` in `update_params`. <!-- A clear and concise description of what the bug is. --> ## To Reproduce Steps to ...
diff --git a/albumentations/augmentations/crops/transforms.py b/albumentations/augmentations/crops/transforms.py index 150478a..24dffb6 100644 --- a/albumentations/augmentations/crops/transforms.py +++ b/albumentations/augmentations/crops/transforms.py @@ -202,7 +202,7 @@ class CropNonEmptyMaskIfExists(DualTransform): ...
albumentations-team__albumentations-1231
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/augmentations/geometric/functional.py:perspective_bbox", "albumentations/augmentations/geometric/functional.py:bbox_affine" ], "edited_modules": [ "albumentati...
albumentations-team/albumentations
02038645f0b830a3925b45c0703153b11bc4ccef
min_visibility param does not work with A.Affine transform ## 🐛 Bug `min_visibility` param does not work with `A.Affine` transform ## To Reproduce Steps to reproduce the behavior: ``` transform = A.Compose( [A.Affine(translate_px=-20, p=1.0)], bbox_params=A.BboxParams(format='pascal_voc', label_f...
diff --git a/albumentations/augmentations/geometric/functional.py b/albumentations/augmentations/geometric/functional.py index bc3782d..5690726 100644 --- a/albumentations/augmentations/geometric/functional.py +++ b/albumentations/augmentations/geometric/functional.py @@ -461,18 +461,12 @@ def perspective_bbox( fo...
albumentations-team__albumentations-1305
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/augmentations/transforms.py:Spatter.__init__", "albumentations/augmentations/transforms.py:Spatter.get_params_dependent_on_targets", "albumentations/augmentations/transfor...
albumentations-team/albumentations
6c16e391d407849c68b0a964ac3e4458a02205c4
Цвет тумана у Spatter()-а Хорошо бы иметь возможность задавать цвет "тумана" https://github.com/albumentations-team/albumentations/blob/master/albumentations/augmentations/transforms.py#L2482 .
diff --git a/albumentations/augmentations/transforms.py b/albumentations/augmentations/transforms.py index fd9b039..a360f61 100644 --- a/albumentations/augmentations/transforms.py +++ b/albumentations/augmentations/transforms.py @@ -2391,6 +2391,10 @@ class Spatter(ImageOnlyTransform): If tuple of float in...
albumentations-team__albumentations-1310
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/core/composition.py:Compose.__init__", "albumentations/core/composition.py:Compose._to_dict", "albumentations/core/composition.py:Compose.get_dict_with_id", "album...
albumentations-team/albumentations
7029e802f15d7c21ed8690ba8812dde6cf16de01
Add check that masks and image have the same height and width This needed to avoid problems inside spatial-level transforms when params generated based on image shapes, for example pad and crop augs.
diff --git a/albumentations/core/composition.py b/albumentations/core/composition.py index dbc78ca..9662afb 100644 --- a/albumentations/core/composition.py +++ b/albumentations/core/composition.py @@ -128,6 +128,8 @@ class Compose(BaseCompose): keypoint_params (KeypointParams): Parameters for keypoints transfo...
albumentations-team__albumentations-1379
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "albumentations/core/composition.py:Compose._check_args" ], "edited_modules": [ "albumentations/core/composition.py:Compose" ] }, "file": "albumentations/core/compositio...
albumentations-team/albumentations
1eceb794ccbf52a02b09e630833f61366bef1149
No disable_shapes_check method of Compose class ## 🐛 Bug The error message says "You can disable shapes check by calling disable_shapes_check method of Compose class.": https://github.com/albumentations-team/albumentations/blob/57988c2091b72e67f37de0332b75d1772d28c651/albumentations/core/composition.py#L285-L290...
diff --git a/albumentations/core/composition.py b/albumentations/core/composition.py index 54f596c..dfc5e86 100644 --- a/albumentations/core/composition.py +++ b/albumentations/core/composition.py @@ -285,7 +285,7 @@ class Compose(BaseCompose): if self.is_check_shapes and shapes and shapes.count(shapes[0]) != ...
albumentations-team__albumentations-569
[ { "changes": { "added_entities": [ "albumentations/augmentations/transforms.py:ImageCompression.get_transform_init_args" ], "added_modules": null, "edited_entities": [ "albumentations/augmentations/transforms.py:ImageCompression.__init__", "albumentations/augmenta...
albumentations-team/albumentations
36d470bfa710b29947b78a94bc241d0175b210b0
Failed to serialize ImageCompression class with albumentations.core.serialization.save ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ## To Reproduce Steps to reproduce the behavior: 1. Wrap ImageCompression class with Compose 2. Save the compose in yaml format using albumentations....
diff --git a/albumentations/augmentations/transforms.py b/albumentations/augmentations/transforms.py index cf69dc0..869d725 100644 --- a/albumentations/augmentations/transforms.py +++ b/albumentations/augmentations/transforms.py @@ -3,12 +3,12 @@ from __future__ import absolute_import, division import math import ran...
albumentations-team__albumentations-616
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "albumentations/augmentations/dropout/channel_dropout.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_en...
albumentations-team/albumentations
85c3c0bbf39b62aec666b9c95cd204a5cdd73803
bboxes with min_visibility are excluded `min_visibility` bbox parameter works as non-strict limit to exclude bboxes. I.e. bboxes with visibility ratio == min_visibility are excluded. It not only contradicts to documentation ('min_visibility (float): Minimum fraction of area for a bounding box to remain this box in li...
diff --git a/albumentations/augmentations/dropout/channel_dropout.py b/albumentations/augmentations/dropout/channel_dropout.py index 45d42c7..48b4707 100644 --- a/albumentations/augmentations/dropout/channel_dropout.py +++ b/albumentations/augmentations/dropout/channel_dropout.py @@ -1,11 +1,10 @@ import random -from ...
alcarney__llyfrau-14
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "llyfrau/cli/tui.py:LinkTable._do_search" ], "edited_modules": [ "llyfrau/cli/tui.py:LinkTable" ] }, "file": "llyfrau/cli/tui.py" }, { "changes": { "added_...
alcarney/llyfrau
4b21afc1246736aeb9403a812b61fada38fd9484
Record number of times a link has been opened Would make for some interesting stats
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0234c68..bcb9b49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: V${{ steps.info.outputs....
alchemistry__alchemlyb-151
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/alchemlyb/estimators/ti_.py:TI.separate_dhdl" ], "edited_modules": [ "src/alchemlyb/estimators/ti_.py:TI" ] }, "file": "src/alchemlyb/estimators/ti_.py" } ]
alchemistry/alchemlyb
51c28a580f777701faeb0d5fd41c022db6b305df
estimators.TI.separate_dhdl will not pass the metadata with multiple index columns as input Code to reproduce ``` >>> import alchemlyb >>> from alchemtest.gmx import load_ABFE >>> from alchemlyb.parsing.gmx import extract_dHdl >>> from alchemlyb.estimators import TI >>> dhdl = alchemlyb.concat([extract_dHdl(loa...
diff --git a/CHANGES b/CHANGES index 5012b79..8d30f71 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,7 @@ Deprecations Fixes - Fix the support for pandas >= 1.3 (issue #147, PR #148). + - Fix separate_dhdl not work for multiple columns (issue #149, PR #151). Changes - The scipy constant for gas constant i...
alchemistry__alchemlyb-183
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/alchemlyb/parsing/__init__.py:_init_attrs" ], "edited_modules": [ "src/alchemlyb/parsing/__init__.py:_init_attrs" ] }, "file": "src/alchemlyb/parsing/__init__.py" ...
alchemistry/alchemlyb
ff491d755d88fdf33724e806ddf3d79623e5f7e2
Gromacs parser cannot handle incomplete lines with - For an incomplete line like `1 -100 -10 -` The last `-` will be giving problems as it cannot be cast as a float during https://github.com/xiki-tempula/alchemlyb/blob/093ad87eca736f724c9a4b4d6843043ea9861f69/src/alchemlyb/parsing/gmx.py#L308 where dtype=np....
diff --git a/CHANGES b/CHANGES index 824dcc5..94d700f 100644 --- a/CHANGES +++ b/CHANGES @@ -13,8 +13,19 @@ The rules for this file: * release numbers follow "Semantic Versioning" https://semver.org ------------------------------------------------------------------------------ -??/??/2022 xiki-tempula - * 0.6.1 ...
alchemistry__alchemlyb-275
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "src/alchemlyb/preprocessing/subsampling.py:slicing" ], "edited_modules": [ "src/alchemlyb/preprocessing/subsampling.py:slicing" ] }, "file": "src/alchemlyb/preprocessin...
alchemistry/alchemlyb
03fdc2791cab5b687b7c3ea9b4d0a788f2f3d265
NAMD - decorrelation and equilibration detection fails in v0.7 and 1.0 Recent updates (to preprocessing.py, I believe) have broken our scripts' ability to use decorrelation and equilibration detection for NAMD output. I have attached an MWE that includes some sample data from alchemtest. The most recent version that wo...
diff --git a/CHANGES b/CHANGES index 4bd7e8c..2ab16ab 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Fixes is not found (issue #272, PR #273). - The regex in the AMBER parser now reads also 'field=value' pairs where there are no spaces around the equal sign (issue #272, PR #273). + - Pre-processing ...
alecthomas__voluptuous-155
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "voluptuous.py:Schema._compile_sequence" ], "edited_modules": [ "voluptuous.py:SequenceItemInvalid", "voluptuous.py:Schema" ] }, "file": "voluptuous.py" } ]
alecthomas/voluptuous
32aeeec65d77940655a2905c9f15114586eb785e
list validation swallows more useful/explicit error messages Take this validator and schema: ```python def is_even(value): if value % 2: raise Invalid('%i is not even' % value) return value schema = Schema(dict(even_number=All(int, is_even))) schema(dict(even_number=3)) ``` We get a usefu...
diff --git a/README.md b/README.md index d991125..74490c2 100644 --- a/README.md +++ b/README.md @@ -522,7 +522,7 @@ backtracking is attempted: ... raise AssertionError('MultipleInvalid not raised') ... except MultipleInvalid as e: ... exc = e ->>> str(exc) == "invalid list value @ data[0][0]" +>>> str(exc) == "...
alecthomas__voluptuous-231
[ { "changes": { "added_entities": [ "voluptuous/schema_builder.py:_isnamedtuple" ], "added_modules": [ "voluptuous/schema_builder.py:_isnamedtuple" ], "edited_entities": [ "voluptuous/schema_builder.py:Schema._compile_sequence" ], "edited_modules"...
alecthomas/voluptuous
99fb7bd43b2cbd8e53cb9e50765c93339b2f7843
NamedTuples do not validate as tuples or named tuples ``` from collections import namedtuple NT = namedtuple('NT', ['a', 'b']) nt = NT(1, 2) t = (1, 2) Schema((int, int))(nt) # => Invalid Schema((int, int))(t) # => Valid Schema(NT(int, int))(nt) # => Invalid Schema(NT(int, int))(t) # => Valid `...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index 053d951..9e4b622 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -106,6 +106,10 @@ ALLOW_EXTRA = 1 # extra keys not in schema will be included in output REMOVE_EXTRA = 2 # extra keys not in schema will be e...
alecthomas__voluptuous-307
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "voluptuous/schema_builder.py:Marker.__init__", "voluptuous/schema_builder.py:Optional.__init__", "voluptuous/schema_builder.py:Exclusive.__init__", "voluptuous/schema_builder.py:...
alecthomas/voluptuous
48d1ea8f0f07478e50da38935d7e452f80d8501b
RFC: Add description attribute to Required/Optional So I'm not sure if this should be even a thing in voluptuous, but since more users of this lib might be interested I thought I'll bring it up. We use voluptuous in [Home Assistant](https://github.com/home-assistant/home-assistant) and it's awesome. For some of the ...
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index 429ab32..2c430a5 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -875,10 +875,11 @@ class VirtualPathComponent(str): class Marker(object): """Mark nodes for special treatment.""" - def __init__(self...
alecthomas__voluptuous-380
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "voluptuous/validators.py:_WithSubValidators.__voluptuous_compile__", "voluptuous/validators.py:_WithSubValidators.__init__" ], "edited_modules": [ "voluptuous/validators.py:_...
alecthomas/voluptuous
7e18e1cf505f3a5d859546871e096481636fa21f
Regression with Any and required Hi, I've observed a change of behaviour in the recent version of voluptuous Here is a sample ``` from voluptuous import Schema, Any, Optional, All, Length anyschema = Schema(Any({ 'name': All(unicode, Length(min=1, max=128)), Optional('protected'): bool, }, { ...
diff --git a/voluptuous/validators.py b/voluptuous/validators.py index 8c6a86d..81566b9 100644 --- a/voluptuous/validators.py +++ b/voluptuous/validators.py @@ -192,12 +192,13 @@ class _WithSubValidators(object): def __init__(self, *validators, **kwargs): self.validators = validators self.msg = k...
alecthomas__voluptuous-507
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "voluptuous/validators.py:In.__call__", "voluptuous/validators.py:NotIn.__call__" ], "edited_modules": [ "voluptuous/validators.py:In", "voluptuous/validators.py:NotIn...
alecthomas/voluptuous
09d0f066a5f7b80973996c90c54a7bb00f62c905
Description argument not documented The `description` argument for the `Marker` class (or any subclass) is not documented anywhere, so it's unclear what's allowed and how it affects the schema.
diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index 6ad8758..f7427f8 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -1020,7 +1020,11 @@ class VirtualPathComponent(str): class Marker(object): - """Mark nodes for special treatment.""" + """Mark nodes ...
alephdata__followthemoney-871
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "followthemoney/types/email.py:EmailType.clean_text" ], "edited_modules": [ "followthemoney/types/email.py:EmailType" ] }, "file": "followthemoney/types/email.py" } ]
alephdata/followthemoney
4b102568a3b3d13a8c4b34de4b7dc0f856a08b9c
Better error handling regarding invalid domains in e-mail cleanup I believe https://github.com/alephdata/ingest-file/issues/253 should be fixed here in `followthemoney`, because https://github.com/alephdata/followthemoney/blob/4b102568a3b3d13a8c4b34de4b7dc0f856a08b9c/followthemoney/types/email.py#L71 might [raise a Uni...
diff --git a/followthemoney/types/email.py b/followthemoney/types/email.py index 51052f28..275980a1 100644 --- a/followthemoney/types/email.py +++ b/followthemoney/types/email.py @@ -68,7 +68,10 @@ class EmailType(PropertyType): domain = domain.lower() domain = domain.rstrip(".") # handle uni...
alephdata__servicelayer-60
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "servicelayer/worker.py:Worker._handle_signal" ], "edited_modules": [ "servicelayer/worker.py:Worker" ] }, "file": "servicelayer/worker.py" } ]
alephdata/servicelayer
ebde2a96658c9ecda9a7f9048cd106ef580dda5b
Worker doesn't exit on KeyboardInterrupt when running in multi-threaded mode
diff --git a/servicelayer/worker.py b/servicelayer/worker.py index 939a3a3..daa0be9 100644 --- a/servicelayer/worker.py +++ b/servicelayer/worker.py @@ -1,5 +1,6 @@ import signal import logging +import sys from threading import Thread from banal import ensure_list from abc import ABC, abstractmethod @@ -23,8 +24,1...
alerta__python-alerta-client-205
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "alertaclient/commands/cmd_heartbeats.py:cli" ], "edited_modules": [ "alertaclient/commands/cmd_heartbeats.py:cli" ] }, "file": "alertaclient/commands/cmd_heartbeats.py"...
alerta/python-alerta-client
a1df91891c9c92ede91513b3caccc8b722b743ca
`alerta heartbeats --alert` broken **Issue Summary** after last update got exception on alerta heartbeats --alert **Environment** - OS: linux ubuntu 16.04 - API version: 7.4.4 - Deployment: self-hosted - For self-hosted, WSGI environment: nginx/uwsgi - Database: postgresql - Server config: Auth enabled...
diff --git a/alertaclient/commands/cmd_heartbeats.py b/alertaclient/commands/cmd_heartbeats.py index b9964ff..5776b2a 100644 --- a/alertaclient/commands/cmd_heartbeats.py +++ b/alertaclient/commands/cmd_heartbeats.py @@ -58,7 +58,7 @@ def cli(obj, alert, severity, timeout, purge): text='Heartbe...
alerta__python-alerta-client-219
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "alertaclient/api.py:HTTPClient.get" ], "edited_modules": [ "alertaclient/api.py:HTTPClient" ] }, "file": "alertaclient/api.py" } ]
alerta/python-alerta-client
10f200428c8e5be995b8925b2663ac22ad88080a
SDK passing page size as "None" if not set **Issue Summary** api_1 | 192.168.208.4 - - [19/Apr/2020 09:58:23] "GET /alert/0a4e3cdd-65c2-4e20-8d9e-678123fef2af/notes?page=1&page-size=None HTTP/1.1" 200 - **Environment** - OS: [eg. Linux, Mac, Windows] - API version: [eg. 6.8.1] - Deployment: [eg. Docker, Her...
diff --git a/alertaclient/api.py b/alertaclient/api.py index 9b01293..391d7b3 100644 --- a/alertaclient/api.py +++ b/alertaclient/api.py @@ -510,6 +510,9 @@ class TokenAuth(AuthBase): class HTTPClient: + DEFAULT_PAGE_NUMBER = 1 + DEFAULT_PAGE_SIZE = 50 + def __init__(self, endpoint, key=None, secret=Non...
alexander-akhmetov__python-telegram-168
[ { "changes": { "added_entities": [ "telegram/client.py:Telegram.get_user_full_info" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "telegram/client.py:Telegram" ] }, "file": "telegram/client.py" } ]
alexander-akhmetov/python-telegram
9d5bece5ac489e70dc773f1d8ec7592c7a9fea78
[FeatureRequest] Add getUserFullInfo() support In the TDLIB update event, there is only the 'sender_user_id' field and no other user identification. Currently, there is no way to get first and last names using python-telegram. As far as I know, to get that information the client should use getUserFullInfo() method. Pl...
diff --git a/telegram/client.py b/telegram/client.py index 9744d32..5a1ea27 100644 --- a/telegram/client.py +++ b/telegram/client.py @@ -227,6 +227,15 @@ class Telegram: return self.call_method('getUser', params={'user_id': user_id}) + def get_user_full_info(self, user_id: int) -> AsyncResult: + ...
alexander-akhmetov__python-telegram-208
[ { "changes": { "added_entities": [ "telegram/client.py:Telegram._register_user", "telegram/client.py:Telegram.register_user" ], "added_modules": null, "edited_entities": [ "telegram/client.py:Telegram.login" ], "edited_modules": [ "telegram/cli...
alexander-akhmetov/python-telegram
534ff81b5fb48eb256ea7e8fbcd6c2ef240b142e
Support authorizationStateWaitRegistration state After manually adding a code from an SMS I received I got the message: ``` ValueError: 'authorizationStateWaitRegistration' is not a valid AuthorizationState ``` It looks like this state is not handled at the moment. According to this page https://core.telegram...
diff --git a/telegram/client.py b/telegram/client.py index 5a1ea27..01a567c 100644 --- a/telegram/client.py +++ b/telegram/client.py @@ -41,6 +41,7 @@ class AuthorizationState(enum.Enum): WAIT_TDLIB_PARAMETERS = 'authorizationStateWaitTdlibParameters' WAIT_ENCRYPTION_KEY = 'authorizationStateWaitEncryptionKey...
alexander-akhmetov__python-telegram-49
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "telegram/client.py:Telegram.get_message" ], "edited_modules": [ "telegram/client.py:Telegram" ] }, "file": "telegram/client.py" }, { "changes": { "added_e...
alexander-akhmetov/python-telegram
14f41c5d18db40a9d4cbed3a11981477d58ad44e
Remove time.sleep from AsyncResult
diff --git a/telegram/client.py b/telegram/client.py index 4e232bd..a1afdc6 100644 --- a/telegram/client.py +++ b/telegram/client.py @@ -221,8 +221,8 @@ class Telegram: def get_message( self, - chat_id, - message_id, + chat_id: int, + message_id: int, ) -> AsyncResult: ...
alexander-akhmetov__python-telegram-73
[ { "changes": { "added_entities": [ "telegram/client.py:Telegram.remove_update_handler" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "telegram/client.py:Telegram" ] }, "file": "telegram/client.py" } ]
alexander-akhmetov/python-telegram
c8d2621fcf195ca094732a8795087f5493530e1e
[Feature Request] Function to remove handler Shouldn't be that complicated but would be nice to have.
diff --git a/telegram/client.py b/telegram/client.py index 75b538d..a32387e 100644 --- a/telegram/client.py +++ b/telegram/client.py @@ -345,6 +345,16 @@ class Telegram: for handler in self._update_handlers[update_type]: self._workers_queue.put((handler, update), timeout=self._queue_put_timeout) ...
alexander-akhmetov__python-telegram-77
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "telegram/utils.py:AsyncResult.parse_update" ], "edited_modules": [ "telegram/utils.py:AsyncResult" ] }, "file": "telegram/utils.py" } ]
alexander-akhmetov/python-telegram
8444d607fe572f088fe10a8cd6d81be898bc7c1e
Client wait for result forever if result update have only @type='ok' Hello, I play with master branch of python-telegram and found a bug. When I try to set my first/last name then AsyncResult wait forever. It happens because Event self._ready.set() in the AsyncResult is set only if update `@type != 'ok'`. I guess...
diff --git a/telegram/utils.py b/telegram/utils.py index 4e3100c..0f55d3b 100644 --- a/telegram/utils.py +++ b/telegram/utils.py @@ -1,11 +1,15 @@ import uuid import threading +import logging from typing import TYPE_CHECKING, Any, Dict, Optional if TYPE_CHECKING: from telegram.client import Telegram # noqa ...
alexander-akhmetov__python-telegram-92
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "telegram/client.py:Telegram.__init__", "telegram/client.py:Telegram._send_encryption_key" ], "edited_modules": [ "telegram/client.py:Telegram" ] }, "file": "tel...
alexander-akhmetov/python-telegram
05eff25b59a3520e77449e14618f5d34d83c1388
"Failed to parse JSON object as TDLib request: Wrong padding length" When tried to login File "/app/index.py", line 17, in <module> tg.login() File "/usr/local/lib/python3.8/site-packages/telegram/client.py", line 439, in login result.wait(raise_exc=True) File "/usr/local/lib/python3.8/site-packages/tel...
diff --git a/telegram/client.py b/telegram/client.py index e427a88..17bf2a5 100644 --- a/telegram/client.py +++ b/telegram/client.py @@ -6,8 +6,9 @@ import signal import typing import getpass import logging +import base64 import threading -from typing import Any, Dict, List, Type, Callable, Optional, DefaultDict, T...
alexgolec__tda-api-105
[ { "changes": { "added_entities": [ "tda/auth.py:__token_loader" ], "added_modules": [ "tda/auth.py:__token_loader" ], "edited_entities": [ "tda/auth.py:__token_updater", "tda/auth.py:client_from_token_file" ], "edited_modules": [ ...
alexgolec/tda-api
8e4897d378b20dfd9fd14abf354902a8414f48e7
Current token format is not portable Pickle is not a portable data format, we should use JSON which is generally the standard for storing oauth credentials across multiple libraries.
diff --git a/tda/auth.py b/tda/auth.py index ff8d2cf..fec6b1e 100644 --- a/tda/auth.py +++ b/tda/auth.py @@ -3,6 +3,7 @@ from requests_oauthlib import OAuth2Session +import json import logging import pickle import time @@ -19,11 +20,28 @@ def __token_updater(token_path): def update_token(t): get_l...
alexgolec__tda-api-129
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tda/auth.py:client_from_access_functions" ], "edited_modules": [ "tda/auth.py:client_from_access_functions" ] }, "file": "tda/auth.py" } ]
alexgolec/tda-api
fb7c7e9ee3205bc2f0cbedf2def89707afb78d56
Auto token-refresh not working any more **Description of Bug** The login flow that's supposed to do an auto-refresh of the token loaded from disk doesn't work any more. I traced it to the parameter passing in `client_from_access_functions` to the `authlib` functions. `authlib`'s `OAuth2Client` expects the URL in `kwar...
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2820fe4..f482edc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python.version }} - uses: actions/s...
alexgolec__tda-api-37
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tda/auth.py:client_from_token_file", "tda/auth.py:client_from_login_flow", "tda/auth.py:easy_client" ], "edited_modules": [ "tda/auth.py:client_from_token_file", ...
alexgolec/tda-api
c9a9a9e0ff215aec66af2a622170e0aad8558a5f
authentication failure Hey I've created an app on TD Ameritrade with a callback URL `https://127.0.0.1:8080` (as [suggested](https://developer.tdameritrade.com/content/authentication-faq) on developer pages). I am making sure I am sending the correct API_KEY and redirect_url to the authentication flow ``` with w...
diff --git a/tda/auth.py b/tda/auth.py index d9c7976..105dadb 100644 --- a/tda/auth.py +++ b/tda/auth.py @@ -58,6 +58,7 @@ def client_from_token_file(token_path, api_key): __register_token_redactions(token) # Return a new session configured to refresh credentials + api_key = __normalize_api_key(api_key) ...
alexgolec__tda-api-38
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "tda/client.py:Client.search_instruments", "tda/client.py:Client.get_quotes", "tda/client.py:Client.get_streamer_subscription_keys" ], "edited_modules": [ "tda/client....
alexgolec/tda-api
eb0aecdb65d326c56727dd26be3848557cb069ee
Functions expecting arrays should tolerate single scalar values Provided they are of the right type.
diff --git a/tda/client.py b/tda/client.py index b1dbc79..31e82ec 100644 --- a/tda/client.py +++ b/tda/client.py @@ -437,6 +437,9 @@ class Client(EnumEnforcer): projection = self.convert_enum( projection, self.Instrument.Projection) + if isinstance(symbols, str): + symbols = [s...
alexhsamuel__ntab-14
[ { "changes": { "added_entities": [ "ntab/tab.py:_ensure_array" ], "added_modules": [ "ntab/tab.py:_ensure_array" ], "edited_entities": [ "ntab/tab.py:Table.__construct", "ntab/tab.py:Table.__init__", "ntab/tab.py:Table.wrap", "ntab/ta...
alexhsamuel/ntab
0cec2c6fdb3e841d13e1e5bc8246bba083f216e0
assign constant to array As a convenience, allow, ```py tbl.a.foo = 42 ``` for either an existing or new array.
diff --git a/ntab/tab.py b/ntab/tab.py index 3d90a41..d259d13 100644 --- a/ntab/tab.py +++ b/ntab/tab.py @@ -9,13 +9,48 @@ from __future__ import absolute_import, division, print_function, unicode_lite from builtins import * import collections from collections import OrderedDict as odict +import itertools imp...
alexhsamuel__ntab-22
[ { "changes": { "added_entities": [ "ntab/fn.py:concat" ], "added_modules": [ "ntab/fn.py:concat" ], "edited_entities": null, "edited_modules": null }, "file": "ntab/fn.py" }, { "changes": { "added_entities": null, "added_modules": n...
alexhsamuel/ntab
7af4eb3ce145f975fb6b03595caeeffa9afe9a6d
add a concatenate function
diff --git a/ntab/fn.py b/ntab/fn.py index 23a3ecd..04282ed 100644 --- a/ntab/fn.py +++ b/ntab/fn.py @@ -1,8 +1,32 @@ +import numpy as np + from .lib import container from .tab import Table #------------------------------------------------------------------------------- +def concat(*tabs): + """ + Conc...
alexis-mignon__python-flickr-api-96
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "flickr_api/upload.py:post" ], "edited_modules": [ "flickr_api/upload.py:post" ] }, "file": "flickr_api/upload.py" } ]
alexis-mignon/python-flickr-api
6d7e5f429ed252a77a0267ce3d248973f0f901b6
Exception UnboundLocalError if server response not 200 when uploading photo ``` Traceback (most recent call last): File "/home/w/projects/panoedit/flickr_upload.py", line 60, in main path = os.path.join(conf.photos_dir, file_name) File "/home/w/projects/panoedit/google_venv/local/lib/python2.7/site-packa...
diff --git a/flickr_api/upload.py b/flickr_api/upload.py index 1595b7f..65de043 100644 --- a/flickr_api/upload.py +++ b/flickr_api/upload.py @@ -58,7 +58,7 @@ def post(url, auth_handler, args, photo_file, photo_file_data=None): data = resp.content if resp.status_code != 200: - raise FlickrError("HTTP...
alexmojaki__stack_data-53
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "stack_data/utils.py:iter_stack" ], "edited_modules": [ "stack_data/utils.py:iter_stack" ] }, "file": "stack_data/utils.py" } ]
alexmojaki/stack_data
df3566c10c7c1cc69e25c32c35666593481aee31
0.6.2: Test case fail when pygments >= 2.16 When building your module with pygments >= 2.16.0, the test cases will fail. Here is the pytest output: <details> <summary>details</summary> ```shell + /usr/bin/python3 -m tox --current-env -q --recreate -e py311 ============================= test session ...
diff --git a/stack_data/utils.py b/stack_data/utils.py index 78ce2d6..ad8cd38 100644 --- a/stack_data/utils.py +++ b/stack_data/utils.py @@ -92,12 +92,13 @@ def is_frame(frame_or_tb: Union[FrameType, TracebackType]) -> bool: def iter_stack(frame_or_tb: Union[FrameType, TracebackType]) -> Iterator[Union[FrameType, ...
alfredodeza__remoto-53
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "remoto/backends/__init__.py:BaseConnection.import_module", "remoto/backends/__init__.py:JsonModuleExecute.__init__" ], "edited_modules": [ "remoto/backends/__init__.py:BaseCo...
alfredodeza/remoto
b6ed62932a5b2164d43a3d644f91e065285a1ef8
Allow remote python interpreter path Currently, `get_python_executable` is used to determine the path for python interpreter on remote nodes. This method runs `which` command to get `python3`, `python2` or `python` command path on the remote system. Different systems can have different python environment setups, es...
diff --git a/remoto/backends/__init__.py b/remoto/backends/__init__.py index 6de9d0e..ff20b79 100644 --- a/remoto/backends/__init__.py +++ b/remoto/backends/__init__.py @@ -114,7 +114,7 @@ class BaseConnection(object): def exit(self): self.group.terminate(timeout=1.0) - def import_module(self, module...
algolia__algoliasearch-client-python-454
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "algoliasearch/search_index.py:SearchIndex.exists" ], "edited_modules": [ "algoliasearch/search_index.py:SearchIndex" ] }, "file": "algoliasearch/search_index.py" }, ...
algolia/algoliasearch-client-python
e631a4cb79f1a79c9fded2783d0eb23070ef966d
feat: add request options in exists method We need to allow passing the `request_options` into the exists method.
diff --git a/algoliasearch/search_index.py b/algoliasearch/search_index.py index b280c3a52..4aaf25d49 100644 --- a/algoliasearch/search_index.py +++ b/algoliasearch/search_index.py @@ -49,11 +49,11 @@ class SearchIndex(object): self._config = config self._name = name - def exists(self): - ...
algoo__hapic-44
[ { "changes": { "added_entities": [ "hapic/context.py:ContextInterface.handle_exception", "hapic/context.py:ContextInterface.handle_exceptions", "hapic/context.py:HandledException.__init__", "hapic/context.py:BaseContext.handle_exception", "hapic/context.py:BaseConte...
algoo/hapic
a1e94438f12271721344ee459a7e31d4458a42ae
Add a feature to manage exceptions globally Currently : if I need to manage an exception for all my endpoints (for example catch `Exception` in order to generate a proper `HTTP 500`), I must add `hapic.handle_exception()` decorator on every route. Expected : I'd like to be able to define generic exception handling w...
diff --git a/hapic/context.py b/hapic/context.py index 5a9aa19..97aa0c4 100644 --- a/hapic/context.py +++ b/hapic/context.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import json import typing from hapic.error import ErrorBuilderInterface @@ -106,8 +107,121 @@ class ContextInterface(object): """ r...
algoo__hapic-51
[ { "changes": { "added_entities": [ "hapic/context.py:ContextInterface.is_debug" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "hapic/context.py:ContextInterface" ] }, "file": "hapic/context.py" }, { "changes": { "...
algoo/hapic
730d2bee7907ae8f68de012c1cfd3e059840ae9e
Error catching: erro details must be given by default When error is catch and transformed to response, error information must be hidden by default. A parameter like "debug" should be able to return it.
diff --git a/hapic/context.py b/hapic/context.py index 97aa0c4..7b5d9b9 100644 --- a/hapic/context.py +++ b/hapic/context.py @@ -135,6 +135,15 @@ class ContextInterface(object): """ raise NotImplementedError() + def is_debug(self) -> bool: + """ + Method called to know if Hapic has ...
algorand__py-algorand-sdk-171
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "algosdk/future/transaction.py:AssetCreateTxn.__init__", "algosdk/future/transaction.py:ApplicationCallTxn.state_schema" ], "edited_modules": [ "algosdk/future/transaction.py:...
algorand/py-algorand-sdk
ab1a24a55fe0178acab563046e0d34cb8700421c
Python SDK should detect the meaningless schema and not msgpack it. If schemas are defined as 0s a signature validation error occurs. This should be checked as described below: These tests: if self.local_schema: d["apls"] = self.local_schema.dictify() if self.global_schema: ...
diff --git a/algosdk/future/transaction.py b/algosdk/future/transaction.py index ce6e283..155826d 100644 --- a/algosdk/future/transaction.py +++ b/algosdk/future/transaction.py @@ -703,8 +703,8 @@ class AssetCreateTxn(AssetConfigTxn): """ def __init__(self, sender, sp, total, decimals, defau...
algorand__py-algorand-sdk-317
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "algosdk/constants.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "algosdk/future/...
algorand/py-algorand-sdk
102874957fbc6f01855c088267a1a2ca320e5c0c
Payment transaction decode with no Receiver While decoding transactions from blocks, if a Payment Transaction includes no receiver but uses only close-to, the `future_msgpack_decode` fails with a complaint about no value set for rcv We can either tweak this line to set the zero address instead of None https://githu...
diff --git a/algosdk/constants.py b/algosdk/constants.py index 7da3840..b12a609 100644 --- a/algosdk/constants.py +++ b/algosdk/constants.py @@ -89,6 +89,9 @@ LOGIC_SIG_MAX_COST = 20000 LOGIC_SIG_MAX_SIZE = 1000 """int: max size of a teal program and its arguments in bytes""" +ZERO_ADDRESS = "AAAAAAAAAAAAAAAAAAAAAA...
algorand__pyteal-114
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pyteal/ast/__init__.py" }, { "changes": { "added_entities": [ "pyteal/ast/binaryexpr.py:ExtractUint16", "pyteal/ast/binaryexpr.p...
algorand/pyteal
208d0f972d54e071fe9b9a50868073bbc5c58a89
Simplify recursive subroutine calling in TEAL 5 ## Summary TEAL 5 introduces the [`cover` and `uncover` opcodes](https://github.com/algorand/go-algorand/pull/2541) for stack manipulation, which can be used to greatly reduce the amount of opcodes and stack space needed to implement recursive subroutine calling. ## S...
diff --git a/docs/byte_expression.rst b/docs/byte_expression.rst index 52e2e95..acc5355 100644 --- a/docs/byte_expression.rst +++ b/docs/byte_expression.rst @@ -29,12 +29,33 @@ example: Substring Extraction -------------------- -Byte slices can be extracted from other byte slices using the :any:`Substring` expressi...
algorand__pyteal-117
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pyteal/ast/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/ar...
algorand/pyteal
81275c5c2024d997aa1b5122f7298545e1e347e4
Support for logging ## Summary TEAL 5 introduces the `log` opcode, which can be used to add byteslices to a list of logged values for the current transaction. ## Scope PyTeal should expose this functionality as well. Perhaps a simple `Log` expression will work for this? ## Priority Needed to support TEAL 5.
diff --git a/pyteal/ast/__init__.py b/pyteal/ast/__init__.py index 4002284..a131142 100644 --- a/pyteal/ast/__init__.py +++ b/pyteal/ast/__init__.py @@ -43,6 +43,7 @@ from .unaryexpr import ( MinBalance, BytesNot, BytesZero, + Log, ) # binary ops @@ -223,6 +224,7 @@ __all__ = [ "BytesGe", ...
algorand__pyteal-124
[ { "changes": { "added_entities": [ "pyteal/ast/app.py:AppParam.address" ], "added_modules": null, "edited_entities": null, "edited_modules": [ "pyteal/ast/app.py:AppParam" ] }, "file": "pyteal/ast/app.py" }, { "changes": { "added_entities...
algorand/pyteal
4594ceacb597ca6e5ae125ab81c1efc783c020c5
TEAL 5 support for PyTeal
diff --git a/.travis.yml b/.travis.yml index 3aea6df..9f2436e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,16 +17,16 @@ jobs: python: "3.7" - name: Python 3.8 python: "3.8" + - name: Python 3.9 + python: "3.9" - stage: Release name: PyPi release - python: "3.8" + py...
algorand__pyteal-234
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/compiler/subroutines.py:spillLocalSlotsDuringRecursion" ], "edited_modules": [ "pyteal/compiler/subroutines.py:spillLocalSlotsDuringRecursion" ] }, "file": "pyte...
algorand/pyteal
f2598da3dec6041051df4442cd9cc7e3c373674d
Incorrect TEAL code produced for mutually recursive subroutines with different argument counts ## Summary There is a bug in the implementation of [`spillLocalSlotsDuringRecursion`](https://github.com/algorand/pyteal/blob/f2598da3dec6041051df4442cd9cc7e3c373674d/pyteal/compiler/subroutines.py#L65-L204) that causes in...
diff --git a/pyteal/compiler/subroutines.py b/pyteal/compiler/subroutines.py index 1b5e63e..78bfa7a 100644 --- a/pyteal/compiler/subroutines.py +++ b/pyteal/compiler/subroutines.py @@ -94,7 +94,6 @@ def spillLocalSlotsDuringRecursion( for subroutine, reentryPoints in recursivePoints.items(): slots = lis...
algorand__pyteal-29
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pyteal/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules"...
algorand/pyteal
9e1ba1bb4ab32f5a1a43bd8084b31aee6e714853
The module `pyteal.ast.int` shadows the Python keyword `int` When importing `pyteal` by `from pyteal import *` (as in the documentation examples), the module `pyteal.ast.int` shadows the Python keyword `int`. In particular, we have ``` $ python3 -c "from pyteal import *; print(int(5))" Traceback (most recent call...
diff --git a/pyteal/__init__.py b/pyteal/__init__.py index b72a01d..ff1f2fb 100644 --- a/pyteal/__init__.py +++ b/pyteal/__init__.py @@ -1,7 +1,19 @@ from .ast import * +from .ast import __all__ as ast_all from .ir import * +from .ir import __all__ as ir_all from .compiler import compileTeal from .types import Teal...
algorand__pyteal-45
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/binaryexpr.py:BinaryExpr.__str__" ], "edited_modules": [ "pyteal/ast/binaryexpr.py:BinaryExpr" ] }, "file": "pyteal/ast/binaryexpr.py" }, { "changes"...
algorand/pyteal
9c0e68bb3a223983a3f41a565487c98776cfbcdb
Add a way to version to PyTeal programs ## Summary For security reasons, PyTeal programs should be written for a specific version of TEAL. This is because new TEAL versions can introduce new fields and transaction types that are not accessible from older versions and which can be dangerous. For example, TEAL v2 introd...
diff --git a/pyteal/ast/binaryexpr.py b/pyteal/ast/binaryexpr.py index 5e2e01e..7664a4f 100644 --- a/pyteal/ast/binaryexpr.py +++ b/pyteal/ast/binaryexpr.py @@ -17,7 +17,7 @@ class BinaryExpr(Expr): return TealBlock.FromOp(TealOp(self.op), self.argLeft, self.argRight) def __str__(self): - ret...
algorand__pyteal-53
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/assert_.py:Assert.__teal__" ], "edited_modules": [ "pyteal/ast/assert_.py:Assert" ] }, "file": "pyteal/ast/assert_.py" }, { "changes": { "added...
algorand/pyteal
bc9d84284115ee0b3d44bf023923b6e2fb6994df
Add support for dynamic gtxn indexes from TEAL 3 ## Summary TEAL 3 allows dynamic indexes to be used when referencing group transactions, so we should support that too. ## Scope TODO ## Urgency This would be nice to do before v0.7.0.
diff --git a/README.md b/README.md index 7aef08e..faad254 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This a non-Turing complete language that allows branch forwards but prevents rec to maximize safety and performance. However, TEAL is essentially an assembly language. With PyTeal, developers can expr...
algorand__pyteal-539
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/bytes.py:Bytes.__init__", "pyteal/ast/bytes.py:Bytes.__teal__", "pyteal/ast/bytes.py:Bytes.__str__" ], "edited_modules": [ "pyteal/ast/bytes.py:Bytes" ...
algorand/pyteal
508b13338ee8d55fd120b22fd1550d8a5d65c854
Odd length hex string should not compile `byte 0x0` is invalid TEAL `1309: encoding/hex: odd length hex string` therefore `Bytes("base16", "0x0")` should not compile into invalid TEAL
diff --git a/CHANGELOG.md b/CHANGELOG.md index dbdb990..f68ff7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Unreleased +## Fixed +* Erroring on constructing an odd length hex string. ([#539](https://github.com/algorand/pyteal/pull/539)) + # 0.18.1 ## Fixed diff --git a/pyteal/ast/bytes.py b/py...
algorand__pyteal-561
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "pyteal/ast/abi/__init__.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/as...
algorand/pyteal
d738ceb5feb74b2ec69f33ef5e93235e8c9b6492
ExecuteMethodCall complains about expecting `byte[]` and getting `byte[]` ### Subject of the issue Without digging more I expect this is a diff between `DynamicBytes` and `DynamicArray[Byte]` Posting this so we don't forget to fix
diff --git a/CHANGELOG.md b/CHANGELOG.md index fe7bada..be248fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ## Changed * Subroutines that take ABI type of Transaction now allow any Transaction type to be passed. ([#531](https://github.com/algorand/pyteal/pull/531)) +* Relaxing exact type check in...
algorand__pyteal-636
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "examples/application/abi/algobank.py" }, { "changes": { "added_entities": [ "pyteal/ast/router.py:MethodConfig.__post_init__", "...
algorand/pyteal
0ff822794f8b8325adf88c0a051129175b0d8801
Improve `Router` clear state program generation ## Problem Currently the ABI `Router` class supports methods and bare app calls for the clear state action. Any such bare app call and/or methods get put into the clear state program, following the same routing rules as the approval program. This is a problem, since...
diff --git a/CHANGELOG.md b/CHANGELOG.md index da02f72..9ddd6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Added ## Changed +* Improved Router clear state program generation. ([#636](https://github.com/algorand/pyteal/pull/636)) + * NOTE: a backwards incompatable change was imposed in this PR:...
algorand__pyteal-655
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/abi/tuple.py:Tuple.set" ], "edited_modules": [ "pyteal/ast/abi/tuple.py:Tuple" ] }, "file": "pyteal/ast/abi/tuple.py" } ]
algorand/pyteal
ed346ad5104a49f5006db2fd69583a88e82d3b67
Improve error message in `Tuple.set` `Tuple.set` currently returns an error if any values given to it do not match the types that the tuple was defined to contain. Right now this error message does not mention any field names or expected/actual types, which is suboptimal, especially for large tuples where it may requir...
diff --git a/CHANGELOG.md b/CHANGELOG.md index f42c4d8..f14ea87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased ## Added +* Improved error handling for tuple type mismatch: added information on position and expected type. ([#655](https://github.com/algorand/pyteal/pull/655)) ## Fixed ...
algorand__pyteal-717
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "pyteal/ast/ec.py:EcOperation.__init__", "pyteal/ast/ec.py:EcOperation.type_of", "pyteal/ast/ec.py:EcAdd", "pyteal/ast/ec.py:EcScalarMul", "pyteal/ast/ec.py:EcPairingCheck...
algorand/pyteal
7f30e21d13874d6710ffa10f068442ba9dc14efb
EcPairingCheck Bug in PyTeal Version 0.26 - Expected uint64, Returns bytes ### Subject of the issue `EcPairingCheck` Bug in PyTeal Version 0.26 ### Your environment - PyTeal version: 0.26 - Algod version: Latest `algorand/algod:stable` docker image - Operating System: Windows 11 ### Steps to reproduce ...
diff --git a/pyteal/ast/ec.py b/pyteal/ast/ec.py index b16252a..f78313a 100644 --- a/pyteal/ast/ec.py +++ b/pyteal/ast/ec.py @@ -27,7 +27,9 @@ class EllipticCurve(Enum): class EcOperation(Expr): - def __init__(self, op: Op, curve: EllipticCurve, args: list[Expr]) -> None: + def __init__( + self, op: O...
algorand__pyteal-75
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "docs/conf.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null...
algorand/pyteal
67d2fcaf71a43b4f7f27d322a96feac03f595fb5
Support byteslice math # Summary TEAL v4 adds support for doing math on byteslices, meaning up to 512-bit uint math is now possible. PyTeal should support this as well. # Scope Supporting this properly may take 2 steps: 1. Add basic support for byteslice math by directly exposing functions like `BytesAdd(a, b)` t...
diff --git a/README.md b/README.md index 95425b4..3ee9475 100644 --- a/README.md +++ b/README.md @@ -38,14 +38,15 @@ In pyteal root directory: Setup venv (one time): * `python3 -m venv venv` - Active venv: * `. venv/bin/activate.fish` (if your shell is fish) * `. venv/bin/activate` (if your shell is bash/zsh)...
ali-ramadhan__matplotloom-7
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "matplotloom/loom.py:Loom.__init__", "matplotloom/loom.py:Loom.__exit__" ], "edited_modules": [ "matplotloom/loom.py:Loom" ] }, "file": "matplotloom/loom.py" }...
ali-ramadhan/matplotloom
3664d332c678b140a5774dee303e9f5119de939b
No video should be produced if exit occurs because of an error or exception ``` min/max: 8.4485 seconds. 1 24 0 2 output_filepath: test_ar.mp4 frames_directory: /tmp/tmpn9xoznqw 1 2 3 ffmpeg -y -framerate 5 -i /tmp/tmpn9xoznqw/frame_%06d.png -vf scale='if(mod(iw,2),-2,iw)':'if(mod(ih,2),-2,ih)':flags=lanczos -c...
diff --git a/matplotloom/loom.py b/matplotloom/loom.py index 0b289dd..84c9f70 100644 --- a/matplotloom/loom.py +++ b/matplotloom/loom.py @@ -12,7 +12,7 @@ class Loom: def __init__( self, output_filepath: Union[Path, str], - frames_directory: Union[Path, str] = Path(TemporaryDirectory().nam...
allenai__rslearn-142
[ { "changes": { "added_entities": [ "rslearn/tile_stores/default.py:DefaultTileStore._get_raster_fname" ], "added_modules": null, "edited_entities": [ "rslearn/tile_stores/default.py:DefaultTileStore.get_raster_bounds", "rslearn/tile_stores/default.py:DefaultTileSt...
allenai/rslearn
b037c611c3d9a52c7feb713b00b2bbc21e02876c
DefaultTileStore: should ignore .tmp files `get_raster_bounds` throws error if there are multiple non-completed files in the raster directory. But this situation can arise if an ingest job fails, leaving a temporary file (due to the atomic write code), and then a later ingest job succeeds. We should ignore .tmp files i...
diff --git a/rslearn/tile_stores/default.py b/rslearn/tile_stores/default.py index 4a9e615..2283db6 100644 --- a/rslearn/tile_stores/default.py +++ b/rslearn/tile_stores/default.py @@ -14,6 +14,7 @@ from upath import UPath from rslearn.utils import Feature, PixelBounds, Projection, STGeometry from rslearn.utils.fsspe...
allisson__python-simple-rest-client-52
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "simple_rest_client/api.py:API.add_resource" ], "edited_modules": [ "simple_rest_client/api.py:API" ] }, "file": "simple_rest_client/api.py" } ]
allisson/python-simple-rest-client
a162ea19bedc26c36f1c1e50ee64ad0bb420b696
Dash in resource name: Mangling of resource names in add_resource() breaks compatibility Problem: recently there was resource name mangling added to add_resource() method which blocks usingn this lib for third-party API with resource names with hyphens. Example: Valid Resource URI: http://some-rest-api/resour...
diff --git a/simple_rest_client/api.py b/simple_rest_client/api.py index d908f5a..ac9894d 100644 --- a/simple_rest_client/api.py +++ b/simple_rest_client/api.py @@ -35,11 +35,10 @@ class API: json_encode_body=None, ssl_verify=None, ): - resource_valid_name = self.correct_attribute_name(res...
allisson__python-simple-rest-client-9
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "simple_rest_client/request.py:make_request", "simple_rest_client/request.py:make_async_request" ], "edited_modules": [ "simple_rest_client/request.py:make_request", "...
allisson/python-simple-rest-client
2b7a0b84f9ba93ab0223da50b28365f61433e73c
json.decoder.JSONDecodeError when processing empty server responses @zmbbb report: Hey, really like your lib and the elegant interface. I encountered an exception (see below) when I received an empty response from the server, in this case a "204 NO CONTENT". The lib forwarded the empty response to JSON for decodi...
diff --git a/.gitignore b/.gitignore index 95ea3fd..ed03ab1 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ htmlcov/ .tox/ .coverage .coverage.* -.cache +.pytest_cache nosetests.xml coverage.xml *,cover diff --git a/CHANGES.rst b/CHANGES.rst index 13d44c2..229f54b 100644 --- a/CHANGES.rst +++ b/CHANGES...
allo-media__text2num-107
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "text_to_num/lang/base.py:Language.not_numeric_word" ], "edited_modules": [ "text_to_num/lang/base.py:Language" ] }, "file": "text_to_num/lang/base.py" }, { "cha...
allo-media/text2num
95b983d5999391e5af9395f2003c7ba391d762ad
Issue when there is 'zéro' before other letters Ex OK: ``` data_zero = 'zéro' print(alpha2digit(data_zero, 'fr')) 0 ``` Ex: NOK: ``` data1 = 'a a un trois sept trois trois sept cinq quatre zéro c c' data2 = 'b b un trois sept trois trois sept cinq quatre zéro d d' print(alpha2digit(data1, 'fr')) print(alpha2...
diff --git a/text_to_num/lang/base.py b/text_to_num/lang/base.py index b2a8cc9..e349c1c 100644 --- a/text_to_num/lang/base.py +++ b/text_to_num/lang/base.py @@ -70,7 +70,7 @@ class Language: return NotImplemented def not_numeric_word(self, word: Optional[str]) -> bool: - return word is None or wo...
allo-media__text2num-113
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "text_to_num/lang/english.py" }, { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "text_to_...
allo-media/text2num
79659e54d4bdf5f4fd0c295747a2b1ccdcedbe4a
forty five hundred thirty => 45 130 instead of 4530 Hello, I'm using your package and the alpha2digit method on english text. The following text returns a wrong value : `forty five hundred thirty dollars and ninety cents` => `45 130 dollars and 90 cents` I'm expecting the following : `4530 dollars and 90 ce...
diff --git a/text_to_num/lang/english.py b/text_to_num/lang/english.py index 4286476..9332a37 100644 --- a/text_to_num/lang/english.py +++ b/text_to_num/lang/english.py @@ -32,6 +32,8 @@ from .base import Language # Those words multiplies lesser numbers (see Rules) # Special case: "hundred" is processed apart. MULTI...
allo-media__text2num-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": null, "edited_modules": null ...
allo-media/text2num
5f9f9da09aa1c698010dcd12cbc38102f71abedf
text2num should raise ValueError instead of AssertionError From the docs ```py >>> text2num('mille mille deux cents') AssertionError ``` First, an error message would be helpful to know what went wrong. Second, the use of `AssertionError` here is a bad choice. An assertion error should only be raised if the p...
diff --git a/.circleci/config.yml b/.circleci/config.yml index f4de54e..7dfbf33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,6 +23,7 @@ jobs: python3 -m venv venv . venv/bin/activate pip install sphinx + pip install flake8 python setu...
allo-media__text2num-77
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": null, "edited_modules": null }, "file": "text_to_num/lang/spanish.py" } ]
allo-media/text2num
b3c763288ff4e49b42c2c9ab8a6b71b553d18526
Spanish numbers like ciento veintitrés not correctly converted The number "ciento veintitrés" in Spanish is converted to 100 instead of 123. It seems "veintitrés" is not recognized.
diff --git a/text_to_num/lang/spanish.py b/text_to_num/lang/spanish.py index cecbf8d..679ccde 100644 --- a/text_to_num/lang/spanish.py +++ b/text_to_num/lang/spanish.py @@ -61,6 +61,10 @@ STENS: Dict[str, int] = { ) } +STENS["veintitrés"] = 23 +STENS["veintidós"] = 22 + + # Ten multiples # Ten multiples may b...
allo-media__text2num-8
[ { "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": null, "edited_modules": null ...
allo-media/text2num
c61648e492097249d9a8f7ed6fd3c25fd12ef572
text2num should raise ValueError instead of AssertionError From the docs ```py >>> text2num('mille mille deux cents') AssertionError ``` First, an error message would be helpful to know what went wrong. Second, the use of `AssertionError` here is a bad choice. An assertion error should only be raised if the p...
diff --git a/.circleci/config.yml b/.circleci/config.yml index f4de54e..7dfbf33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,6 +23,7 @@ jobs: python3 -m venv venv . venv/bin/activate pip install sphinx + pip install flake8 python setu...
allo-media__text2num-96
[ { "changes": { "added_entities": null, "added_modules": null, "edited_entities": [ "text_to_num/lang/german.py:German.split_number_word" ], "edited_modules": [ "text_to_num/lang/german.py:German" ] }, "file": "text_to_num/lang/german.py" }, { "...
allo-media/text2num
03165958242c33b2770cde1701a39ba3436b8103
Billions followed by millions (e.g. 1,025,000,000) not converted for English, French When the next multiplier is a million, following billions, it is not handled correctly. It is not detected as an expected valid multiplier. There is a "TODO" comment in the related code, I suspect it is about this issue. It doesn't ...
diff --git a/text_to_num/lang/german.py b/text_to_num/lang/german.py index 87966b1..4c79874 100644 --- a/text_to_num/lang/german.py +++ b/text_to_num/lang/german.py @@ -211,7 +211,7 @@ class German(Language): if not found: # is (large) ordinal ending? ord_match = None - ...