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 |
|---|---|---|---|---|---|
lovasoa__marshmallow_dataclass-76 | [
{
"changes": {
"added_entities": [
"marshmallow_dataclass/__init__.py:BaseSchema.load"
],
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:BaseSchema.make_data_class"
],
"edited_modules": [
"marshmallow_dataclass/__init__.... | lovasoa/marshmallow_dataclass | 69caec49402adb07149ff87700ef52eeeeba0066 | Behavior of marshmallow.post_load is dependent on function name
I discovered a discrepancy with how the `post_load` decorator behaves within a marshmallow dataclass. In [Schema._invoke_processors](https://github.com/marshmallow-code/marshmallow/blob/76196abf35ff9ec58f3dc2377ea7a8a9bf23712a/src/marshmallow/schema.py#L11... | diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
index 67e7d77..403da98 100644
--- a/marshmallow_dataclass/__init__.py
+++ b/marshmallow_dataclass/__init__.py
@@ -34,10 +34,9 @@ Full example::
})
Schema: ClassVar[Type[Schema]] = Schema # For the type checker
"""
-import ... |
lovasoa__marshmallow_dataclass-81 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:_field_by_type",
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:_field_by_ty... | lovasoa/marshmallow_dataclass | bfda341de52c5ca4e0c5898c644298ff39720254 | Bug: not allow null in any values
```py
from typing import Any
from typing import Dict
from marshmallow_dataclass import dataclass
@dataclass()
class A:
data: Dict[str, Any]
A.Schema().load({
'data': {'inner_data': None}
})
``` | diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
index 403da98..9b223a5 100644
--- a/marshmallow_dataclass/__init__.py
+++ b/marshmallow_dataclass/__init__.py
@@ -319,12 +319,9 @@ def _proxied_class_schema(
def _field_by_type(
typ: Union[type, Any], base_schema: Optional[Type[mar... |
lovasoa__marshmallow_dataclass-85 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"marshmallow_dataclass/__init__.py:field_for_schema"
],
"edited_modules": [
"marshmallow_dataclass/__init__.py:field_for_schema"
]
},
"file": "marshmallow_dataclass/__in... | lovasoa/marshmallow_dataclass | c57a440198de020073c5291e872bdb08ce247292 | Use NewType for derived List class
Hi there!
Coming from vanilla marshmallow, I had a `List` class that was deriving from `marshmallow.fields.List` and was adding some logic to how it was reading the input data on `_deserialize`.
Now, I am trying to integrate this with `marshmallow_dataclass` and hence create a n... | diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py
index 9b223a5..d6f1554 100644
--- a/marshmallow_dataclass/__init__.py
+++ b/marshmallow_dataclass/__init__.py
@@ -351,6 +351,7 @@ def field_for_schema(
"""
metadata = {} if metadata is None else dict(metadata)
+
if defau... |
lubianat__pyorcidator-40 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pyorcidator/helper.py:get_external_ids"
],
"edited_modules": [
"src/pyorcidator/helper.py:get_external_ids"
]
},
"file": "src/pyorcidator/helper.py"
}
] | lubianat/pyorcidator | 990e7e4b0926bf68b53af5f13f57aa5224bddc96 | Parse websites and social links
e.g. see https://orcid.org/0000-0002-5292-4083 | diff --git a/src/pyorcidator/helper.py b/src/pyorcidator/helper.py
index 278e5ea..03d15cc 100644
--- a/src/pyorcidator/helper.py
+++ b/src/pyorcidator/helper.py
@@ -5,6 +5,7 @@ Helper functions for pyorcidator
import json
import logging
import re
+from typing import Mapping
import requests
@@ -18,15 +19,30 @@ E... |
lucianopaz__compress_pickle-20 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"compress_pickle/compress_pickle.py:dump",
"compress_pickle/compress_pickle.py:dumps"
],
"edited_modules": [
"compress_pickle/compress_pickle.py:dump",
"compress_pickl... | lucianopaz/compress_pickle | 72738519d3a2e2ef634ed7032c27c549c41ace2f | Add optional "pickletools.optimize" step to dump
Add optional "pickletools.optimize" step to dump prior to the compression.
https://docs.python.org/3/library/pickletools.html#pickletools.optimize
This should squeeze some additional load performance and size reduction for minimal effort.
| diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 6fbc25d..6224741 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -91,7 +91,7 @@ stages:
reportDirectory: "$(System.DefaultWorkingDirectory)/**/htmlcov"
- bash: |
- bash <(curl -s https://codecov.io/bash)
+ bash <(cu... |
lucianopaz__compress_pickle-28 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "compress_pickle/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"compress... | lucianopaz/compress_pickle | 99ce03df097018870f502823f814db2d578cd0e5 | File ending with `.pkl.gz` is stored as `.pklgz`
Hello @lucianopaz,
Thank you for making this library!
I wanted to ask why, if the provided path is `.pkl.gz`, the files are stored as `.pklgz`.
This feels like an undesired default behaviour that may be, if necessary, enabled with a flag, as it breaks libraries th... | diff --git a/compress_pickle/__init__.py b/compress_pickle/__init__.py
index a9221a9..1471ef4 100644
--- a/compress_pickle/__init__.py
+++ b/compress_pickle/__init__.py
@@ -4,4 +4,4 @@ from . import compressers
from . import picklers
from . import io
-__version__ = "2.0.0"
+__version__ = "2.0.1"
diff --git a/compre... |
lucidsushi__gs_pip_install-132 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gs_pip_install/gs_pip_install.py:install_packages"
],
"edited_modules": [
"gs_pip_install/gs_pip_install.py:install_packages"
]
},
"file": "gs_pip_install/gs_pip_instal... | lucidsushi/gs_pip_install | 09668ce1fe393dc338b5b3f3181f76bd44891e74 | Path error when specifying extras
https://github.com/lucidsushi/gs_pip_install/blob/09668ce1fe393dc338b5b3f3181f76bd44891e74/gs_pip_install/gs_pip_install.py#L79
Currently a list of lists is created - will raise:
ERROR: Invalid requirement: 'gcs_packages/geotab_data_factory.tar.gz[[pipelines]]'
Hint: It looks li... | diff --git a/gs_pip_install/gs_pip_install.py b/gs_pip_install/gs_pip_install.py
index 1313713..3bc6d66 100644
--- a/gs_pip_install/gs_pip_install.py
+++ b/gs_pip_install/gs_pip_install.py
@@ -76,7 +76,7 @@ def install_packages(
package, *_ = gs_package_zip_file.split('.')
install_path = f"{packages_d... |
lucidsushi__gs_pip_install-135 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gs_pip_install/gs_pip_install.py:install_packages",
"gs_pip_install/gs_pip_install.py:download_packages"
],
"edited_modules": [
"gs_pip_install/gs_pip_install.py:install_pack... | lucidsushi/gs_pip_install | dd0e90a8897c4df97d6b547570a2072a88996032 | gs_pip_install v0.2.4 installs in incorrect location
* gs_pip_install version: 0.2.4
* Python version: 3.6.8
* Operating System: Linux (Ubuntu)
### Description
when running gs_pip_install, it does not install in correct python system site package. The site package in my virtualenv was `/home/matthewwong/.local/sh... | diff --git a/gs_pip_install/gs_pip_install.py b/gs_pip_install/gs_pip_install.py
index c17a315..fab8ce9 100644
--- a/gs_pip_install/gs_pip_install.py
+++ b/gs_pip_install/gs_pip_install.py
@@ -13,9 +13,7 @@ from google.cloud import storage
@click.command()
@click.option('-b', "--bucket_name", help="(str) Name of GCS ... |
lukasgeiter__mkdocs-awesome-pages-plugin-59 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mkdocs_awesome_pages_plugin/meta.py:MetaNavItem.__init__",
"mkdocs_awesome_pages_plugin/meta.py:MetaNavItem.from_yaml"
],
"edited_modules": [
"mkdocs_awesome_pages_plugin/met... | lukasgeiter/mkdocs-awesome-pages-plugin | fcb37ddff481898ae403115f07f57528d631db00 | Grouping of Rest items is not working
I'm experiencing a `TypeError` error with the following configuration:
**.pages:**
```yaml
order: desc
nav:
- 2020 Blogs:
- ... | regex=2020[A-Z0-9a-z_-]+.md
- 2019 Blogs:
- ... | regex=2019[A-Z0-9a-z_-]+.md
```
However the following configuration is worki... | diff --git a/mkdocs_awesome_pages_plugin/meta.py b/mkdocs_awesome_pages_plugin/meta.py
index baa4acf..d04c62c 100644
--- a/mkdocs_awesome_pages_plugin/meta.py
+++ b/mkdocs_awesome_pages_plugin/meta.py
@@ -14,7 +14,7 @@ class DuplicateRestItemError(Exception):
class MetaNavItem:
- def __init__(self, value: str, ... |
lukasgeiter__mkdocs-awesome-pages-plugin-75 | [
{
"changes": {
"added_entities": [
"mkdocs_awesome_pages_plugin/navigation.py:AwesomeNavigation._get_item_title"
],
"added_modules": null,
"edited_entities": [
"mkdocs_awesome_pages_plugin/navigation.py:AwesomeNavigation._order",
"mkdocs_awesome_pages_plugin/navig... | lukasgeiter/mkdocs-awesome-pages-plugin | b40def78499ac69ca659d7f2038d67701b590b19 | order_by title does not work with folder
the new order_by feature works great with multible files in one directory. Thank you!
But the new feature does not work with directories:
directory tree:
```tree
│ mkdocs.yml
└───docs
│ .pages
│ index.md
├───1
│ .pages (Title: A (1))
... | diff --git a/mkdocs_awesome_pages_plugin/navigation.py b/mkdocs_awesome_pages_plugin/navigation.py
index 62b1fd6..812f796 100644
--- a/mkdocs_awesome_pages_plugin/navigation.py
+++ b/mkdocs_awesome_pages_plugin/navigation.py
@@ -93,7 +93,7 @@ class AwesomeNavigation:
return
if order_by == Meta.O... |
lukasgeiter__mkdocs-awesome-pages-plugin-79 | [
{
"changes": {
"added_entities": [
"mkdocs_awesome_pages_plugin/meta.py:Meta.try_load_from_files"
],
"added_modules": null,
"edited_entities": [
"mkdocs_awesome_pages_plugin/meta.py:Meta.try_load_from"
],
"edited_modules": [
"mkdocs_awesome_pages_plugi... | lukasgeiter/mkdocs-awesome-pages-plugin | 572c230f3dc5a4b5fdac8a14a2c7402986844fc4 | Allow `mkdocs-gen-files` generated content
:wave: Loving the plugin!
Currently also loving https://github.com/oprypin/mkdocs-gen-files, but noticed that if I generate navs, or pages referenced by my static navs, they don't end up making it to the generated docsite.
E.g.
`mkdocs.yml`
```yaml
plugins:
- gen-... | diff --git a/mkdocs_awesome_pages_plugin/meta.py b/mkdocs_awesome_pages_plugin/meta.py
index 52e0bf9..3acc1da 100644
--- a/mkdocs_awesome_pages_plugin/meta.py
+++ b/mkdocs_awesome_pages_plugin/meta.py
@@ -4,6 +4,7 @@ from enum import Enum
from pathlib import PurePath
from typing import Optional, List, Union, Any, Ite... |
lukasschwab__arxiv.py-118 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"arxiv/arxiv.py:Result._get_default_filename"
],
"edited_modules": [
"arxiv/arxiv.py:Result"
]
},
"file": "arxiv/arxiv.py"
},
{
"changes": {
"added_entitie... | lukasschwab/arxiv.py | 3d013ab7d4dd6515c0dbd5146c89db113688029e | Error when downloading paper with '/' in short id
# Description
If the short id of a paper contains a '/' downloading the source or pdf without providing a filename results in ` FileNotFoundError: [Errno 2] No such file or directory: './hep-ex/0406020v1.Sparticle_Reconstruction_at_LHC.pdf'`
I guess the reason for... | diff --git a/arxiv/arxiv.py b/arxiv/arxiv.py
index e6e974e..b1acfbc 100644
--- a/arxiv/arxiv.py
+++ b/arxiv/arxiv.py
@@ -192,9 +192,11 @@ class Result(object):
A default `to_filename` function for the extension given.
"""
nonempty_title = self.title if self.title else "UNTITLED"
- # Re... |
lukasschwab__arxiv.py-64 | [
{
"changes": {
"added_entities": [
"arxiv/arxiv.py:Result.__eq__"
],
"added_modules": null,
"edited_entities": [
"arxiv/arxiv.py:Result.__repr__",
"arxiv/arxiv.py:Search.__repr__",
"arxiv/arxiv.py:Client.__repr__",
"arxiv/arxiv.py:UnexpectedEmptyPa... | lukasschwab/arxiv.py | 5e066f8e59f15cea1a9f3df5858ad44dcf909f9a | Add `__eq__` methods to result classes
# Motivation
> A clear and concise description of what the problem is. For example, "I'm always frustrated when..."
Makes it easier to find papers that match certain properties among results, esp. to look up by author.
# Solution
> A clear and concise description of what y... | diff --git a/Makefile b/Makefile
index e1f9123..540212d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ test: $(source) $(tests)
docs: docs/index.html
docs/index.html: $(source)
- pdoc arxiv -o docs
+ pdoc ./arxiv -o docs
mv docs/arxiv/arxiv.html docs/index.html
rm docs/arxiv.html
rmdir docs/arxiv
@@ -... |
lukasschwab__arxiv.py-76 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"arxiv/arxiv.py:Result.get_short_id"
],
"edited_modules": [
"arxiv/arxiv.py:Result"
]
},
"file": "arxiv/arxiv.py"
},
{
"changes": {
"added_entities": null,... | lukasschwab/arxiv.py | 071291e2af968b825aba34bdaef5e955cebbc152 | `get_short_id` incorrect for pre-March 2007 arXiv identifiers: missing archive
<!-- See [Stack Overflow's "How do I ask a good question?"](https://stackoverflow.com/help/how-to-ask) -->
Error:
```
/usr/local/lib/python3.7/dist-packages/arxiv/arxiv.py in results(self, search)
552 ))
553 ... | diff --git a/arxiv/arxiv.py b/arxiv/arxiv.py
index 60d5d97..95fea41 100644
--- a/arxiv/arxiv.py
+++ b/arxiv/arxiv.py
@@ -170,10 +170,18 @@ class Result(object):
"""
Returns the short ID for this result.
- If the result URL is `"http://arxiv.org/abs/quant-ph/0201082v1"`,
- `result.get_s... |
lukasschwab__arxiv.py-81 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"arxiv/arxiv.py:Result._from_feed_entry",
"arxiv/arxiv.py:Client.results"
],
"edited_modules": [
"arxiv/arxiv.py:Result",
"arxiv/arxiv.py:Client"
]
},
"f... | lukasschwab/arxiv.py | 19b352b171c4371d219163d1fafddcb5e355ef5d | AttributeError: nonexistent IDs in `id_list`s yield invalid entries
# Description
> A clear and concise description of what the bug is.
When a specified ID doesn't correspond to an arXiv paper, the results feed includes an `entry` element missing expected fields (`id`).
The status is 200, but `feedparser` chokes... | diff --git a/arxiv/arxiv.py b/arxiv/arxiv.py
index e4720c2..263ed9f 100644
--- a/arxiv/arxiv.py
+++ b/arxiv/arxiv.py
@@ -109,6 +109,8 @@ class Result(object):
Converts a feedparser entry for an arXiv search result feed into a
Result object.
"""
+ if not hasattr(entry, "id"):
+ ... |
lundberg__respx-13 | [
{
"changes": {
"added_entities": [
"respx/mock.py:HTTPXMock.request"
],
"added_modules": null,
"edited_entities": [
"respx/mock.py:HTTPXMock.add"
],
"edited_modules": [
"respx/mock.py:HTTPXMock"
]
},
"file": "respx/mock.py"
},
{
"... | lundberg/respx | 4581904f2f03eed9ed9b5980d24dbb4408e66e6b | Add http method shortcuts
It would be nice to have api shortcuts for each http method.
**Example:**
```py
request = responsex.get("https://foo/bar", status_code=202)
# ^
response = httpx.get("https://foo/bar")
assert request.called
assert response.status_code == 202
```
Also maybe rena... | diff --git a/README.md b/README.md
index 9ab2fb1..ca3148f 100644
--- a/README.md
+++ b/README.md
@@ -11,14 +11,16 @@ A utility for mocking out the Python [httpx](https://github.com/encode/httpx) li
import httpx
import respx
-with respx.activate():
- respx.add("GET", "https://foo.bar/", content={"foo": "bar"})
- ... |
lundberg__respx-14 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "respx/__init__.py"
},
{
"changes": {
"added_entities": [
"respx/mock.py:HTTPXMock.assert_all_called"
],
"added_modules": nul... | lundberg/respx | 3d50d73888a816d39d6806273085589869543a49 | Optional assertion that all added patterns was triggered
To be in line with `responses` api, maybe name it the same `assert_all_requests_are_fired`.
Also decide what default for contextmanager use should be, `True` or `False`.
**Example:**
```py
with responsex.HTTPXMock(assert_all_requests_are_fired=False) as m... | diff --git a/Makefile b/Makefile
index bb8ef75..abdffbc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+.PHONY: all
+all: format lint mypy coverage
+
+
.PHONY: test
test:
python setup.py test $(test)
diff --git a/respx/__init__.py b/respx/__init__.py
index df7b555..c084937 100644
--- a/respx/__init__.py
+++ b... |
lundberg__respx-20 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"respx/mock.py:HTTPXMock.request",
"respx/mock.py:HTTPXMock._match",
"respx/mock.py:HTTPXMock._patch_backend",
"respx/mock.py:HTTPXMock._get_response_spy"
],
"edited_m... | lundberg/respx | 05747d93cdac6c9c91e909f63c95bd56410da15b | Pass-through requests
It would sometimes be useful to mark a pattern to pass-through the request to the original url.
**Ideas:**
```py
with respx.mock():
respx.get(...., pass_through=True)
# -- and/or --
respx.get(...., pass_through=pass_through_or_not)
def pass_through_or_not(request, **kwargs):... | diff --git a/respx/mock.py b/respx/mock.py
index 39d4176..c3f45e5 100644
--- a/respx/mock.py
+++ b/respx/mock.py
@@ -108,6 +108,7 @@ class HTTPXMock:
content: typing.Optional[ContentDataTypes] = None,
content_type: typing.Optional[str] = None,
headers: typing.Optional[HeaderTypes] = None,
+ ... |
lundberg__respx-206 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"respx/patterns.py:M"
],
"edited_modules": [
"respx/patterns.py:M"
]
},
"file": "respx/patterns.py"
}
] | lundberg/respx | 019a8a839193af265b15c92a2b7f8dec67c6cb65 | Cannot create a lookup to match empty params
https://github.com/lundberg/respx/blob/c76f632690cdfb2c878fe8fea999df0a26083eb3/respx/patterns.py#L502-L507
E.g. `respx_mock.get("https://example.com", params__eq={}).mock(...)` matches request with any query params including empty.
Looks like the value check must be mor... | diff --git a/respx/patterns.py b/respx/patterns.py
index 37ab1d4..59a9e4d 100644
--- a/respx/patterns.py
+++ b/respx/patterns.py
@@ -504,9 +504,6 @@ def M(*patterns: Pattern, **lookups: Any) -> Optional[Pattern]:
extras = None
for pattern__lookup, value in lookups.items():
- if not value:
- ... |
lundberg__respx-21 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"respx/mock.py:HTTPXMock.__init__",
"respx/mock.py:HTTPXMock.assert_all_called",
"respx/mock.py:HTTPXMock._match",
"respx/mock.py:HTTPXMock._get_response_spy"
],
"edit... | lundberg/respx | 3e36da0d783a0bc143df9828a0e61c148f0fbc0c | Raise on non-matching request
Add setting to raise an exception when a request is captured but not matching any added pattern, with the possibility to disable/enable the feature.
Decide what the default behaviour should be, raise or always mock responses.
What exception should be raised, `AssertionError` or `Conn... | diff --git a/respx/mock.py b/respx/mock.py
index c3f45e5..fd62371 100644
--- a/respx/mock.py
+++ b/respx/mock.py
@@ -24,8 +24,11 @@ __all__ = ["HTTPXMock"]
class HTTPXMock:
- def __init__(self, assert_all_called: bool = True) -> None:
+ def __init__(
+ self, assert_all_called: bool = True, assert_all_... |
lundberg__respx-23 | [
{
"changes": {
"added_entities": [
"respx/mock.py:HTTPXMock._capture",
"respx/mock.py:HTTPXMock._async_send_spy",
"respx/mock.py:HTTPXMock._sync_send_spy"
],
"added_modules": null,
"edited_entities": [
"respx/mock.py:HTTPXMock.__init__",
"respx/moc... | lundberg/respx | cad93496daff21df27de1e4f74eadf0ed8b218ce | ResponseNotRead when attempting to access response data through respx.calls
I'm working on mocking an api client I've written using httpx which manipulates the data before returning it, and I can't seem to get the raw content from the request (before the manipulation). I've reconstructed what the client does, with cook... | diff --git a/respx/mock.py b/respx/mock.py
index fd62371..4daa0f3 100644
--- a/respx/mock.py
+++ b/respx/mock.py
@@ -2,13 +2,21 @@ import io
import ssl
import typing
from contextlib import contextmanager
-from functools import partialmethod, wraps
+from functools import partial, partialmethod, wraps
import asynct... |
lundberg__respx-259 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"respx/patterns.py:Data.clean"
],
"edited_modules": [
"respx/patterns.py:Data"
]
},
"file": "respx/patterns.py"
},
{
"changes": {
"added_entities": null,
... | lundberg/respx | 15522db36d6a08f2c062831ec664df2b9d2e1f69 | None type doesn't work in data matching as of v0.21.0
As of the latest version `v0.21.0`, None values in data lookups don't work:
```python
import httpx
import respx
@respx.mock
def test():
data = {"test": None}
respx.post("http://test.com", data=data).respond()
response = httpx.post("http... | diff --git a/respx/patterns.py b/respx/patterns.py
index d8b00b5..8d80148 100644
--- a/respx/patterns.py
+++ b/respx/patterns.py
@@ -548,7 +548,9 @@ class Data(MultiItemsMixin, Pattern):
value: MultiItems
def clean(self, value: Dict) -> MultiItems:
- return MultiItems(value)
+ return MultiItem... |
lundberg__respx-260 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"respx/patterns.py:Files._normalize_file_value"
],
"edited_modules": [
"respx/patterns.py:Files"
]
},
"file": "respx/patterns.py"
}
] | lundberg/respx | de7a983ca141ef04bf93d5ddba3c9100d9d57eda | `files` pattern not handling `str` and `io.BytesIO`
When using the `files` parameter in a helper (http) function, both `str` and `io.BytesIO` payloads are not deemed equal and raise an error.
# Input
## `str` payload
```py
@respx.mock
def test_file_str_payload():
FILE_DATA = {"upload": ("image/png", "str"... | diff --git a/respx/patterns.py b/respx/patterns.py
index 8d80148..da2022a 100644
--- a/respx/patterns.py
+++ b/respx/patterns.py
@@ -1,3 +1,4 @@
+import io
import json as jsonlib
import operator
import pathlib
@@ -562,7 +563,7 @@ class Files(MultiItemsMixin, Pattern):
key = "files"
value: MultiItems
- ... |
lundberg__respx-264 | [
{
"changes": {
"added_entities": [
"respx/patterns.py:Data._normalize_value"
],
"added_modules": null,
"edited_entities": [
"respx/patterns.py:Data.clean",
"respx/patterns.py:Files._normalize_file_value"
],
"edited_modules": [
"respx/patterns.p... | lundberg/respx | 39f754a18e6ce3c2e8d4050b8a9a0ead35752ce5 | Data pattern matching for lists broken between 0.20.2 and 0.21.1
Using httpx==0.25.1
Test case:
```py
def test_respx_data_list():
with respx.mock:
respx.post("http://example.com", data={"foo": ["bar"]})
httpx.post("http://example.com", data={"foo": ["bar"]})
```
In 0.20.2 this test pas... | diff --git a/respx/patterns.py b/respx/patterns.py
index da2022a..c5b351d 100644
--- a/respx/patterns.py
+++ b/respx/patterns.py
@@ -548,9 +548,17 @@ class Data(MultiItemsMixin, Pattern):
key = "data"
value: MultiItems
- def clean(self, value: Dict) -> MultiItems:
+ def _normalize_value(self, value: A... |
lundberg__respx-60 | [
{
"changes": {
"added_entities": [
"respx/transports.py:BaseMockTransport.pop"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"respx/transports.py:BaseMockTransport"
]
},
"file": "respx/transports.py"
}
] | lundberg/respx | e4994013259bcf1b44aa202f55d0449198e312f0 | Poping a request pattern by alias
I'm using `respx` in pytest fixtures. I found a common issue that I was not able to solve easily: Updating one request pattern in a collection of mocked requests, provided by global fixture.
Example:
```python
@pytest.fixture
def mock_services() -> Iterator[MockTransport]:
... | diff --git a/docs/api.md b/docs/api.md
index c319320..43d152a 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -175,6 +175,33 @@ def test_something():
assert response.json() == {"id": 123}
```
+### Manipulating Existing Patterns
+
+Clearing all existing patterns:
+
+``` python
+import respx
+
+
+@respx.mock
+def t... |
lux-org__lux-322 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lux/action/univariate.py:univariate"
],
"edited_modules": [
"lux/action/univariate.py:univariate"
]
},
"file": "lux/action/univariate.py"
},
{
"changes": {
... | lux-org/lux | 2553125fa8bd551b10d85ad67419bcd9b3b0eeab | [Feature Request] Geographic data support for Matplotlib
# Feature Request Description
Via #253, we now have support for geographic data types using Vegalite as the backend. We would like to extend support for this feature on [Matplotlib](https://matplotlib.org/) as well.
For example, running
```
lux.config.p... | diff --git a/README.md b/README.md
index 103f670..a8f7e56 100644
--- a/README.md
+++ b/README.md
@@ -131,15 +131,16 @@ VisList(["Region=?","AverageCost"],df)
To find out more about other features in Lux, see the complete documentation on [ReadTheDocs](https://lux-api.readthedocs.io/).
-# Installation
+# Installat... |
lux-org__lux-343 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lux/action/univariate.py:univariate"
],
"edited_modules": [
"lux/action/univariate.py:univariate"
]
},
"file": "lux/action/univariate.py"
},
{
"changes": {
... | lux-org/lux | 1a723322bc0f291f2053bae7dcdee1bab2dec603 | Misdetected data type when numerical column contains null
When a column contains null values, it can get misclassified as a nominal type, even if it has high cardinality and is largely quantitative. For instance, in this example, the `# Instances` and `# Attributes` are detected as `nominal` but they are better suited ... | diff --git a/lux/action/univariate.py b/lux/action/univariate.py
index e94af9b..e44e832 100644
--- a/lux/action/univariate.py
+++ b/lux/action/univariate.py
@@ -84,10 +84,13 @@ def univariate(ldf, *args):
examples = f" (e.g., {possible_attributes[0]})"
intent = [lux.Clause("?", data_type="geograph... |
lux-org__lux-442 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lux/executor/PandasExecutor.py:PandasExecutor.execute_binning",
"lux/executor/PandasExecutor.py:PandasExecutor.execute_2D_binning"
],
"edited_modules": [
"lux/executor/Pandas... | lux-org/lux | 91e8e9885668bd42e1a125247a0d3166273b2a9a | ValueError: cannot specify integer `bins` when input data contains infinity [BUG]
Trying to open a dataframe from a .csv that contains numpy.inf values fails with this error:
```
import lux, pandas
df = pandas.read_csv('filepath')
```
```
C:\Users\???\anaconda\envs\base_up_to_date\lib\site-packages\IPython\core... | diff --git a/lux/executor/PandasExecutor.py b/lux/executor/PandasExecutor.py
index 30dfdf4..8d2314c 100644
--- a/lux/executor/PandasExecutor.py
+++ b/lux/executor/PandasExecutor.py
@@ -281,6 +281,8 @@ class PandasExecutor(Executor):
"""
import numpy as np
+ vis._vis_data = vis._vis_data.repla... |
lyft__cartography-1004 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cartography/intel/aws/inspector.py:get_inspector_findings",
"cartography/intel/aws/inspector.py:transform_inspector_findings",
"cartography/intel/aws/inspector.py:_load_findings_tx",
... | lyft/cartography | 1960113953c436bf8dca4098c5336fde19c3925f | AWS Inspector findings timeout
*Title*: *AWS Inspector findings timeout*
*Description*:
> Cartography is crashing when attempting to retrieve Inspector finding from ap-northeast-3
*To Reproduce*:
> cartography --experimental-neo4j-4x-support --neo4j-uri bolt://127.0.0.1:7687 --aws-sync-all-profiles
*Logs*:
... | diff --git a/cartography/intel/aws/inspector.py b/cartography/intel/aws/inspector.py
index 023dc88e..0262fd15 100644
--- a/cartography/intel/aws/inspector.py
+++ b/cartography/intel/aws/inspector.py
@@ -8,6 +8,8 @@ import boto3
import neo4j
from cartography.util import aws_handle_regions
+from cartography.util impo... |
lyft__cartography-1061 | [
{
"changes": {
"added_entities": [
"cartography/intel/aws/iam.py:get_policy_name_from_arn"
],
"added_modules": [
"cartography/intel/aws/iam.py:get_policy_name_from_arn"
],
"edited_entities": [
"cartography/intel/aws/iam.py:get_group_managed_policy_data",
... | lyft/cartography | 585fc0667feda4cf0d42ebe428cc3ab36fe6432e | cartography treats managed IAM policies as if they were inline policies
*Description*:
> What issue is being seen? Describe what should be happening instead of the bug, for example: Cartography should not crash, the expected value isn't returned, the data schema is wrong, etc.
cartography treats IAM managed polici... | diff --git a/cartography/intel/aws/iam.py b/cartography/intel/aws/iam.py
index 90662b94..c652a3f2 100644
--- a/cartography/intel/aws/iam.py
+++ b/cartography/intel/aws/iam.py
@@ -28,6 +28,10 @@ class PolicyType(enum.Enum):
inline = 'inline'
+def get_policy_name_from_arn(arn: str) -> str:
+ return arn.split(... |
lyft__cartography-1087 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cartography/intel/aws/iam.py:get_role_tags"
],
"edited_modules": [
"cartography/intel/aws/iam.py:get_role_tags"
]
},
"file": "cartography/intel/aws/iam.py"
}
] | lyft/cartography | a187fbcdce75306c8a61035afa94010fe6bf54fa | Issue while re syncing the AWS resources to Neo4J - get_role_tags crash
**Bug Template**
*Title*: *Issue while re syncing the AWS resources to Neo4J*
*Description*:
> An unhandled exception is raised when cartography attempts to sync stage 'aws'
*To Reproduce*:
DockerFile content:
FROM python:3.9.16-sli... | diff --git a/cartography/intel/aws/iam.py b/cartography/intel/aws/iam.py
index 0e77cb0b..6e013388 100644
--- a/cartography/intel/aws/iam.py
+++ b/cartography/intel/aws/iam.py
@@ -165,7 +165,7 @@ def get_role_managed_policy_data(boto3_session: boto3.session.Session, role_list
@timeit
def get_role_tags(boto3_session:... |
lyft__cartography-1111 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cartography/intel/aws/iam.py:transform_policy_data"
],
"edited_modules": [
"cartography/intel/aws/iam.py:transform_policy_data"
]
},
"file": "cartography/intel/aws/iam.... | lyft/cartography | 81902b23fa80e4ba5332ba00b4477e3a556d5eb7 | IAM statement not being transformed properly
*Title*: IAM Statement is not being transformed properly
*Description*:
In iam.py: _transform_policy_statements method if the original statement is not a list, it is transposed as a list:
if not isinstance(statements, list):
statements = [statements]
Ho... | diff --git a/cartography/intel/aws/iam.py b/cartography/intel/aws/iam.py
index 6e013388..ff5f3574 100644
--- a/cartography/intel/aws/iam.py
+++ b/cartography/intel/aws/iam.py
@@ -540,11 +540,12 @@ def transform_policy_data(policy_map: Dict, policy_type: str) -> None:
for principal_arn, policy_statement_map in poli... |
lyft__cartography-331 | [
{
"changes": {
"added_entities": [
"cartography/intel/aws/iam.py:_parse_principal_entries"
],
"added_modules": [
"cartography/intel/aws/iam.py:_parse_principal_entries"
],
"edited_entities": [
"cartography/intel/aws/iam.py:load_roles"
],
"edited_... | lyft/cartography | 1f473eac668b4975d7adc5b09e17f251495821b6 | AWS IAM: Principals are not parsed correctly for multiple principal map entries
**AWS IAM: Principals are not parsed correctly for multiple principal map entries**
*Initial Fix + Unit Test*
roshinis78@0459cb317ee23f5b99b9668c19b283544db4594e
*Description*
In AWS policy statements, principals can have more than ... | diff --git a/cartography/intel/aws/iam.py b/cartography/intel/aws/iam.py
index 07dfdd82..9635e65f 100644
--- a/cartography/intel/aws/iam.py
+++ b/cartography/intel/aws/iam.py
@@ -224,6 +224,21 @@ def load_groups(neo4j_session, groups, current_aws_account_id, aws_update_tag):
)
+def _parse_principal_entries... |
lyft__cartography-680 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cartography/graph/job.py:GraphJob.__init__",
"cartography/graph/job.py:GraphJob.merge_parameters",
"cartography/graph/job.py:GraphJob.run",
"cartography/graph/job.py:GraphJob.as_... | lyft/cartography | 694d6f572763ab22abf141e5b3480dfb05368757 | Failure during the cleanup job of EC2 snapshots
I've experienced a new failure during the cleanup job of EC2 snapshots:
```
neobolt.exceptions.ClientError: Unable to load NODE with id <redacted>.
```
Full log:
```
ERROR:cartography.graph.job:Unhandled error while executing statement in job 'cleanup EBS ... | diff --git a/cartography/graph/job.py b/cartography/graph/job.py
index f1684abc..73afb1c8 100644
--- a/cartography/graph/job.py
+++ b/cartography/graph/job.py
@@ -1,8 +1,15 @@
import json
import logging
+from pathlib import Path
+from typing import Dict
+from typing import List
+import neo4j
+
+from cartography.gra... |
lyft__cartography-912 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "cartography/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"cartography/... | lyft/cartography | 6b02a42178018905458bf86f1d7b966d46b36864 | Upgrade CI to use neo4j 4.x
KTLO/Chore
We need to upgrade our CI to use neo4j 4.x. | diff --git a/cartography/__init__.py b/cartography/__init__.py
index 30a7c587..60e628bf 100644
--- a/cartography/__init__.py
+++ b/cartography/__init__.py
@@ -1,5 +1,4 @@
-__all__ = ['EXPERIMENTAL_NEO4J_4X_SUPPORT', 'patch_session_obj']
+__all__ = ['patch_session_obj']
# experimental neo4j 4.x support
-from cartogra... |
lzakharov__csv2md-22 | [
{
"changes": {
"added_entities": [
"csv2md/table.py:Table.__widths"
],
"added_modules": null,
"edited_entities": [
"csv2md/table.py:Table.__init__",
"csv2md/table.py:Table.markdown"
],
"edited_modules": [
"csv2md/table.py:Table"
]
},
... | lzakharov/csv2md | 2dd166be84bcbd86da199cb4186ab908ad9ab9c1 | Escape pipe symbol in items
# Problem
Given a table with a pipe symbol (`|`) in an item, glow wrongly splits the item into pieces seperated by the pipe symbol.
This messes up the table when it is post-rendered by other markdown tools (i.e. glow).
# Steps to reproduce:
See the wrongly formatted line 2 of the... | diff --git a/csv2md/table.py b/csv2md/table.py
index 36a9ae1..eb7691d 100644
--- a/csv2md/table.py
+++ b/csv2md/table.py
@@ -6,36 +6,43 @@ from .utils import column_letter
class Table:
def __init__(self, cells):
self.cells = cells
- self.widths = list(map(max, zip(*[list(map(len, row)) for row in ... |
m-lab__bigsanity-17 | [
{
"changes": {
"added_entities": [
"bigsanity/query_construct.py:_project_to_time_field"
],
"added_modules": [
"bigsanity/query_construct.py:_project_to_time_field"
],
"edited_entities": [
"bigsanity/query_construct.py:TableEquivalenceQueryGenerator._format_... | m-lab/bigsanity | 7bb4df0ddb204026af693e91f33e13a039f66a3d | paris_traceroute uses log_time
paris_traceroute data uses `log_time` rather than `web100_log_entry.log_time` since Paris Traceroute is not web100 based. We need to adjust the query construction to address this. | diff --git a/bigsanity/query_construct.py b/bigsanity/query_construct.py
index 58e1b2d..cead3cd 100644
--- a/bigsanity/query_construct.py
+++ b/bigsanity/query_construct.py
@@ -102,6 +102,26 @@ def _project_has_intermediate_snapshots(project):
project == constants.PROJECT_ID_NPAD)
+def _project_to_time... |
m-labs__nmigen-50 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nmigen/hdl/rec.py:Record.__init__"
],
"edited_modules": [
"nmigen/hdl/rec.py:Record"
]
},
"file": "nmigen/hdl/rec.py"
}
] | m-labs/nmigen | 81ee2db1636a504d2e60fc4649db4afde8b27e4c | seperator of signal names in records causes ambiguity
When creating a `Record`, the signals inside it are named `recordname_fieldname` currently.
This makes it hard to see the hierarchy when using snake case names for records and fields as well. I.e. having a record named `some_record` with a field named `some_field... | diff --git a/nmigen/hdl/rec.py b/nmigen/hdl/rec.py
index 999c85b..f1ddbd2 100644
--- a/nmigen/hdl/rec.py
+++ b/nmigen/hdl/rec.py
@@ -72,7 +72,7 @@ class Record(Value):
def concat(a, b):
if a is None:
return b
- return "{}_{}".format(a, b)
+ return "{}__{}".fo... |
m-lundberg__simple-pid-4 | [
{
"changes": {
"added_entities": [
"simple_pid/PID.py:PID.set_auto_mode"
],
"added_modules": null,
"edited_entities": [
"simple_pid/PID.py:PID.auto_mode"
],
"edited_modules": [
"simple_pid/PID.py:PID"
]
},
"file": "simple_pid/PID.py"
}
... | m-lundberg/simple-pid | 45c3a197901f8fd6ebdc606bbdf18be9b8fd8a02 | Auto_Mode toggling causes disturbance
Hi,
Firstly, great tool, thank you!
I have been working on implementing the controller and I think I've come across an unintended bug in the code when it comes to toggling "auto_mode" off and on again.
The issue arises for two reasons:
1.
self._last_time is not update... | diff --git a/README.md b/README.md
index c564b5a..f03e739 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,18 @@ To disable the PID so that no new values are computed, set auto mode to False:
pid.auto_mode = False # no new values will be computed when pid is called
pid.auto_mode = True # pid is enabled again
`... |
m-lundberg__simple-pid-41 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simple_pid/pid.py:PID.__init__",
"simple_pid/pid.py:PID.__call__",
"simple_pid/pid.py:PID.__repr__"
],
"edited_modules": [
"simple_pid/pid.py:PID"
]
},
... | m-lundberg/simple-pid | 7cd080473e582e4de29b49f9d002d2bd62ef33ca | Derivative Term is calculated on error and not input
the derivative term is calculated on the derivative of the error term and not on the derivative of the input ([see here](https://en.wikipedia.org/wiki/PID_controller#Derivative_term)).
The code below should not contain something like dinput but a derror term whic... | diff --git a/README.md b/README.md
index 150d087..907aa03 100644
--- a/README.md
+++ b/README.md
@@ -99,6 +99,12 @@ To eliminate overshoot in certain types of systems, you can calculate the [propo
pid.proportional_on_measurement = True
```
+#### Differential on measurement
+By default the [differential term is calc... |
m0nhawk__grafana_api-43 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"grafana_api/grafana_api.py:GrafanaAPI.__init__",
"grafana_api/grafana_api.py:GrafanaAPI.__getattr__"
],
"edited_modules": [
"grafana_api/grafana_api.py:GrafanaAPI"
]
... | m0nhawk/grafana_api | b5f1266273fb836580b03224456843b043089814 | Missing timeouts
**Describe the bug**
The requests never timeout, this is not a good idea in general
**Expected behavior**
The user should be able to set one and there should be a default (maybe 10s) | diff --git a/grafana_api/grafana_api.py b/grafana_api/grafana_api.py
index e965768..bb7cc5e 100644
--- a/grafana_api/grafana_api.py
+++ b/grafana_api/grafana_api.py
@@ -56,9 +56,11 @@ class GrafanaAPI:
url_path_prefix="",
protocol="http",
verify=True,
+ timeout=5.0,
):
se... |
m3dev__gokart-147 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gokart/redis_lock.py:RedisParams"
]
},
"file": "gokart/redis_lock.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
... | m3dev/gokart | 5a10506e5ef762d384fec1651e9cb56daa276336 | Default path for make_large_data_frame_target
In the same manner as `output()`、it might be great if `make_large_data_frame_target()` can produce default path.
```
file_path = self.__module__.replace('.', '/')
return self.make_large_data_frame_target(os.path.join(file_path, f'{type(self).__name__}.z... | diff --git a/gokart/redis_lock.py b/gokart/redis_lock.py
index d371b67..a287fd0 100644
--- a/gokart/redis_lock.py
+++ b/gokart/redis_lock.py
@@ -11,11 +11,11 @@ logger = getLogger(__name__)
class RedisParams(NamedTuple):
- redis_host: str = None
- redis_port: str = None
- redis_timeout: int = None
- re... |
macbre__sql-metadata-113 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata.py:_get_token_normalized_value",
"sql_metadata.py:_update_table_names",
"sql_metadata.py:get_query_tables"
],
"edited_modules": [
"sql_metadata.py:_get_t... | macbre/sql-metadata | aeed2afacdf6367c6671f0497e682ee9852582d3 | missing tables returned by sql_metadata.get_query_tables
Hello,
I have 80 long queries, and for 27 of them, results are not correct for "sql_metadata.get_query_tables(ddl)"
Here is an example:
ddl_for_sql_metadata.sql
```
SELECT
"attr1"
FROM
(
SELECT
"attr2"
FROM
(database1.table1 ... | diff --git a/sql_metadata.py b/sql_metadata.py
index 46aa30b..4a754ed 100644
--- a/sql_metadata.py
+++ b/sql_metadata.py
@@ -171,7 +171,7 @@ def get_query_columns(query: str) -> List[str]:
return unique(columns)
-def _get_token_normalized_value(token: str) -> str:
+def _get_token_normalized_value(token: sqlpar... |
macbre__sql-metadata-126 | [
{
"changes": {
"added_entities": [
"sql_metadata/parser.py:Parser._is_create_table_query"
],
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.columns",
"sql_metadata/parser.py:Parser.tables"
],
"edited_modules": [
"sql... | macbre/sql-metadata | ab2fc185545c32af62d49d4776d70307075e2100 | Support for CREATE TABLE... statements | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 00938bb..887c505 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -18,7 +18,7 @@ from sql_metadata.keywords_lists import (
TABLE_ADJUSTMENT_KEYWORDS,
WITH_ENDING_KEYWORDS,
)
-from sql_metadata.token import SQLToken
+from sq... |
macbre__sql-metadata-127 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.columns"
],
"edited_modules": [
"sql_metadata/parser.py:Parser"
]
},
"file": "sql_metadata/parser.py"
}
] | macbre/sql-metadata | dce28a7f5dd99286664f3ea2d82b1c0757f89a14 | sql_metadata.get_query_columns result error
demo
```
sql_metadata.get_query_columns("select max(col3)+avg(col)+1+sum(col2) from dual")
// result : ['col3', 'avg', 'col', 'sum', 'col2']. avg sum shouldn't be a column
sql_metadata.get_query_columns("select avg(col)+sum(col2) from dual")
// result: ['avg', 'c... | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 472ad57..c6a7548 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -57,7 +57,7 @@ class Parser: # pylint: disable=R0902
@property
def tokens(self) -> List[SQLToken]:
"""
- :rtype: list[SQLToken]
+ Toke... |
macbre__sql-metadata-140 | [
{
"changes": {
"added_entities": [
"sql_metadata/parser.py:Parser._flatten_sqlparse"
],
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.__init__",
"sql_metadata/parser.py:Parser.tokens",
"sql_metadata/parser.py:Parser.columns",
... | macbre/sql-metadata | c8062f08684268f5e1822b52ce7f58567982737b | Tables with leading digits are not properly recognized
https://github.com/macbre/index-digest/runs/2567720826
```
ERROR indexdigest.linters.linter_0006_not_used_columns_and_tables:linter_0006_not_used_columns_and_tables.py:91 Unable to extract tables and columns used from the query: SELECT test
ERROR indexdi... | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 887c505..2ad3e07 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -5,8 +5,8 @@ import re
from typing import Dict, List, Optional, Tuple, Union
import sqlparse
-from sqlparse.sql import TokenList
-from sqlparse.tokens import Whites... |
macbre__sql-metadata-143 | [
{
"changes": {
"added_entities": [
"sql_metadata/parser.py:Parser._flatten_sqlparse"
],
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.__init__",
"sql_metadata/parser.py:Parser.tokens",
"sql_metadata/parser.py:Parser._preprocess... | macbre/sql-metadata | e8b2a73da290e893fcef268c1c6baaef811f5479 | Tables with leading digits are not properly recognized
https://github.com/macbre/index-digest/runs/2567720826
```
ERROR indexdigest.linters.linter_0006_not_used_columns_and_tables:linter_0006_not_used_columns_and_tables.py:91 Unable to extract tables and columns used from the query: SELECT test
ERROR indexdi... | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 887c505..10be534 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -5,8 +5,8 @@ import re
from typing import Dict, List, Optional, Tuple, Union
import sqlparse
-from sqlparse.sql import TokenList
-from sqlparse.tokens import Whites... |
macbre__sql-metadata-164 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.__init__",
"sql_metadata/parser.py:Parser.query_type"
],
"edited_modules": [
"sql_metadata/parser.py:Parser"
]
},
"file": "sql_met... | macbre/sql-metadata | fd54bcb7b29bddb097e24cbe578415fb5a79cf95 | Parser raises an exception for not supported query type when query starts with a comment
When working on [index-digest's PR](https://github.com/macbre/index-digest/pull/244) I have found the following issue.
An example call:
```python
tables = get_query_tables("/* foo */ INSERT IGNORE INTO `0070_insert_ignore` V... | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 869720b..ed35226 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -1,6 +1,7 @@
"""
This module provides SQL query parsing functions
"""
+import logging
import re
from typing import Dict, List, Optional, Tuple, Union
@@ -29,6 +3... |
macbre__sql-metadata-203 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.__init__",
"sql_metadata/parser.py:Parser.columns_aliases",
"sql_metadata/parser.py:Parser._determine_opening_parenthesis_type",
"sql_metadata/parse... | macbre/sql-metadata | ccacebfed43b89f298906f8eda7e646cdcab84fd | Alias and column names from subquery are case sensitive when used as conditions in outer query
It seem like case must match on alias/column names from subquery when they are used as a condition in the outer query, *only* if the subquery alias is used in the condition.
for example, this works:
```sql
select tEsT
f... | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index ec8a823..0d28390 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -66,7 +66,7 @@ class Parser: # pylint: disable=R0902
self._subquery_level = 0
self._nested_level = 0
self._parenthesis_level = 0
- se... |
macbre__sql-metadata-316 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"sql_metadata/keywords_lists.py:QueryType"
]
},
"file": "sql_metadata/keywords_lists.py"
},
{
"changes": {
"added_entities": null,
"added_m... | macbre/sql-metadata | fbf93ee1f748225cbb0bfab7d22b4d01b9e7a2d3 | Issue with table extraction for delete and drop query type
hi,
Do you know why or when the above query type (delete, drop) should be supported? Or why it's not supported by now?
thanks. | diff --git a/sql_metadata/keywords_lists.py b/sql_metadata/keywords_lists.py
index b20e12d..3414f1c 100644
--- a/sql_metadata/keywords_lists.py
+++ b/sql_metadata/keywords_lists.py
@@ -76,6 +76,7 @@ class QueryType(str, Enum):
SELECT = "SELECT"
CREATE = "CREATE TABLE"
ALTER = "ALTER TABLE"
+ DROP = "D... |
macbre__sql-metadata-387 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.limit_and_offset"
],
"edited_modules": [
"sql_metadata/parser.py:Parser"
]
},
"file": "sql_metadata/parser.py"
}
] | macbre/sql-metadata | e5cc1c9c9345daa6977c0c4971a1164ad1d8aa5f | limit_and_offset method bug?
example query:
sqltext = Parser("SELECT count(*) FROM aa WHERE grad = 88038 AND userid in(222,333) AND type = 1 AND checkable = 'sea' LIMIT 50 OFFSET 1000").limit_and_offset
actually result(wrong):
(333, 1000)
Expected result
(50, 1000)
| diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index ab0a8fc..349f044 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -382,8 +382,12 @@ class Parser: # pylint: disable=R0902
elif token.last_keyword_normalized == "OFFSET":
# OFFSET <offset>
... |
macbre__sql-metadata-388 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/parser.py:Parser.tables"
],
"edited_modules": [
"sql_metadata/parser.py:Parser"
]
},
"file": "sql_metadata/parser.py"
}
] | macbre/sql-metadata | 1c20ba1785c6ecff89f703eeab9e11361c368b15 | Can not handle correctly with mysql upsert statement
```sql
insert into user (id, name, age)
values ('user1', 'john doe', 20)
on duplicate key
update name='john doe', age=20;
```
The correct value of `Parser(sql).tables` is `['user']`, but it returns `['user', 'name', 'age']`.
I used `0.4.3`. | diff --git a/sql_metadata/parser.py b/sql_metadata/parser.py
index 349f044..c422846 100644
--- a/sql_metadata/parser.py
+++ b/sql_metadata/parser.py
@@ -357,6 +357,14 @@ class Parser: # pylint: disable=R0902
)
):
continue
+
+ # handle INSERT INT... |
macbre__sql-metadata-440 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata/generalizator.py:Generalizator.without_comments"
],
"edited_modules": [
"sql_metadata/generalizator.py:Generalizator"
]
},
"file": "sql_metadata/generaliza... | macbre/sql-metadata | c2b9188df8d76203b505e3f051c8e22557692905 | AttributeError: 'NoneType' object has no attribute 'value' when parsing a relatively simple inner query
This feels as if it should work but failing. I'll try to look into it but thought I'd bring it up in case it's an easy fix.
```
SELECT max(dt) FROM
(
SELECT max(dt) as dt FROM t
UN... | diff --git a/sql_metadata/generalizator.py b/sql_metadata/generalizator.py
index 5cdb093..8f0678c 100644
--- a/sql_metadata/generalizator.py
+++ b/sql_metadata/generalizator.py
@@ -47,7 +47,8 @@ class Generalizator:
:rtype: str
"""
sql = sqlparse.format(self._raw_query, strip_comments=True)
-... |
macbre__sql-metadata-521 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"sql_metadata/keywords_lists.py:QueryType"
]
},
"file": "sql_metadata/keywords_lists.py"
},
{
"changes": {
"added_entities": null,
"added_m... | macbre/sql-metadata | 9a78fbc099eee07d929cef7bce63fdf2110a0de2 | parse does not support `truncate table <tablename>` queries
```
import sql_metadata
sql_metadata.parser.Parser('truncate table foo.bar.baz').tokens
```
results in
```
----> 1 sql_metadata.parser.Parser('truncate table foo.bar.baz').tokens
File /turbo/tsantos/pyenvs/ni.bau_38/lib/python3.8/site-packages/sql_m... | diff --git a/sql_metadata/keywords_lists.py b/sql_metadata/keywords_lists.py
index 8521c29..4abeaea 100644
--- a/sql_metadata/keywords_lists.py
+++ b/sql_metadata/keywords_lists.py
@@ -81,6 +81,7 @@ class QueryType(str, Enum):
CREATE = "CREATE TABLE"
ALTER = "ALTER TABLE"
DROP = "DROP TABLE"
+ TRUNCAT... |
macbre__sql-metadata-76 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata.py:get_query_tables"
],
"edited_modules": [
"sql_metadata.py:get_query_tables"
]
},
"file": "sql_metadata.py"
}
] | macbre/sql-metadata | ff36c6a841b989b252a17ded7ce3326fe97404bb | get_query_tables() CTE Case Sensitive for SELECT
For the following query:
`import sql_metadata`
`sql_metadata.get_query_tables("create table abc.foo as SELECT pqr.foo1 , ab.foo2 FROM foo pqr, bar ab")`
get_query_tables return the expected output
`['abc.foo', 'foo', 'bar']`
But when SELECT is in lowercase -
... | diff --git a/sql_metadata.py b/sql_metadata.py
index cd983cf..c6dd9e5 100644
--- a/sql_metadata.py
+++ b/sql_metadata.py
@@ -288,7 +288,7 @@ def get_query_tables(query: str) -> List[str]:
elif str(token) == "(":
# reset the last_keyword for INSERT `foo` VALUES(id, bar) ...
last_keywor... |
macbre__sql-metadata-77 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sql_metadata.py:get_query_columns"
],
"edited_modules": [
"sql_metadata.py:get_query_columns"
]
},
"file": "sql_metadata.py"
}
] | macbre/sql-metadata | a881b834719febd98de12aa0cb4f739fdafbfb7f | get_query_columns does not return nothing if parsing SELECT DISTINCT
Hi, with the following query, I do not get any results:
>>> print(sql_metadata.get_query_columns("SELECT DISTINCT DATA.ASSAY_ID FROM foo"))
[]
>>> print(sql_metadata.get_query_columns("SELECT DATA.ASSAY_ID FROM foo"))
['DATA.ASSAY_ID']
Is thi... | diff --git a/sql_metadata.py b/sql_metadata.py
index c6dd9e5..532ad02 100644
--- a/sql_metadata.py
+++ b/sql_metadata.py
@@ -97,6 +97,8 @@ def get_query_columns(query: str) -> List[str]:
"LIKE",
"CASE",
"WHEN",
+ "DISTINCT",
+ "UNIQUE",
]
# these keywords are followe... |
maciej-gol__tenant-schemas-celery-78 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"tenant_schemas_celery/app.py:CeleryApp.create_task_cls"
],
"edited_modules": [
"tenant_schemas_celery/app.py:CeleryApp"
]
},
"file": "tenant_schemas_celery/app.py"
}
... | maciej-gol/tenant-schemas-celery | 9f76a5cf6ea5b79d3a35c492bc4b0f0b9b0efe79 | Unable to override the default base Task class for tasks registered without the base option
**Context:**
1. We have overridden the `TenantTask` class provided by `tenant-schemas-celery` for our use-case - consider it to be named as `DerivedTenantTask`
2. There exists a task, defined as, for example:
```
@app.task
... | diff --git a/tenant_schemas_celery/app.py b/tenant_schemas_celery/app.py
index c96e557..f6bc93c 100644
--- a/tenant_schemas_celery/app.py
+++ b/tenant_schemas_celery/app.py
@@ -76,10 +76,11 @@ task_postrun.connect(
class CeleryApp(Celery):
registry_cls = 'tenant_schemas_celery.registry:TenantTaskRegistry'
- ... |
macports__upt-macports-18 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"upt_macports/upt_macports.py:MacPortsPackage.licenses"
],
"edited_modules": [
"upt_macports/upt_macports.py:MacPortsPackage"
]
},
"file": "upt_macports/upt_macports.py"... | macports/upt-macports | e3905d65c8308cec8acbf38ec3b1ec1b18e8f523 | Update port
The `py-upt-macports` port is currently generating defunct packages, including #11 and printing empty licence name (https://github.com/macports/macports-ports/pull/4489).
Can you please update the `Portfile`?
@rajdeepbharati | diff --git a/upt_macports/upt_macports.py b/upt_macports/upt_macports.py
index a8bf18f..59e1fe4 100644
--- a/upt_macports/upt_macports.py
+++ b/upt_macports/upt_macports.py
@@ -32,7 +32,7 @@ class MacPortsPackage(object):
spdx2macports = json.loads(f.read())
return ' '.join([spdx2macports.get(li... |
macports__upt-macports-48 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"upt_macports/upt_macports.py:MacPortsPackage.create_package",
"upt_macports/upt_macports.py:MacPortsPackage._create_portfile"
],
"edited_modules": [
"upt_macports/upt_macport... | macports/upt-macports | f3c01cfd8ea12bf8d1ba1329849311bd6719d98c | Do not create (or clean-up) the directory structure/Portfile if something fails
When testing the templates, I ran into a few situations where while creating the package we would stumble upon an ```upt.upt.ArchiveUnavailable: No such archive could be found``` problem.
For example,
```
py-scitools
[INFO ] [Back... | diff --git a/upt_macports/upt_macports.py b/upt_macports/upt_macports.py
index 055b455..bee3821 100755
--- a/upt_macports/upt_macports.py
+++ b/upt_macports/upt_macports.py
@@ -16,11 +16,12 @@ class MacPortsPackage(object):
def create_package(self, upt_pkg, output):
self.upt_pkg = upt_pkg
self.lo... |
madelyneriksen__dashml-10 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dashml/core.py:render",
"dashml/core.py:safe",
"dashml/core.py:__safe_string",
"dashml/core.py:swap_attributes"
],
"edited_modules": [
"dashml/core.py:render"... | madelyneriksen/dashml | bf8b5833133d4d66e2c382007746c26c8e45fe6b | Rendering for non-string types.
# Overview
DashML should be able to render non-string types.
## How
* Most classes should probably be cast to a string, as a form of "least surprise".
* Boolean attributes should obey HTML5 boolean rules, which means `true` should keep the attribute and `false` should remove it... | diff --git a/README.md b/README.md
index 7f89aaf..56f6bb1 100644
--- a/README.md
+++ b/README.md
@@ -242,7 +242,6 @@ python bench.py # or `make bench`
DashML could not be built without these libraries:
* [lxml](https://lxml.de) for creating a _fast_ XML library.
-* [Pallets Projects](https://palletsprojects.com/) f... |
magenta__ddsp-87 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ddsp/losses.py:SpectralLoss.call"
],
"edited_modules": [
"ddsp/losses.py:SpectralLoss"
]
},
"file": "ddsp/losses.py"
},
{
"changes": {
"added_entities": n... | magenta/ddsp | 18147a0120f69bf62908c0ae19f3a66735c39b35 | All alternative spectral losses throw an error
SpectralLoss:
I am trying to use alternative loss weights, but all of them throw an error except logmag_weight and mag_weight:
```
INFO:tensorflow:Error reported to Coordinator: in user code:
/usr/local/lib/python3.6/dist-packages/ddsp/training/models.py:64 __c... | diff --git a/ddsp/losses.py b/ddsp/losses.py
index be3828c..76dfbfd 100644
--- a/ddsp/losses.py
+++ b/ddsp/losses.py
@@ -135,8 +135,9 @@ class SpectralLoss(tfkl.Layer):
self.loss_type)
if self.loudness_weight > 0:
- target = spectral_ops.compute_loudness... |
magmax__python-inquirer-516 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/list_hints.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/inquirer/... | magmax/python-inquirer | 0b658eff177845775f5eae807fdc833754b7377e | Tuples as list choices no longer works as expected with v3.2.2 - regression from v3.2.1
The following example prints the integer part of the selected entry with v3.2.1 but the string entry in v3.2.2. I think this is a regression and not working as expected.
```python
import inquirer
entries = [
("one", 1),
(... | diff --git a/examples/list_hints.py b/examples/list_hints.py
index b2877ea..ce76801 100644
--- a/examples/list_hints.py
+++ b/examples/list_hints.py
@@ -3,9 +3,9 @@ from pprint import pprint
import inquirer # noqa
choices_hints = {
- "Jumbo": "The biggest one we have",
- "Large": "If you need the extra kick"... |
magmax__python-inquirer-526 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/inquirer/questions.py:Question.__init__"
],
"edited_modules": [
"src/inquirer/questions.py:Question"
]
},
"file": "src/inquirer/questions.py"
},
{
"changes"... | magmax/python-inquirer | a4a6615981a1716a9c11e4f775794c4712d46bf5 | Tuples as list choices can't be hashed when containing a dict
In 3.2.1, the following worked:
```
>>> import inquirer
>>> test = [('aa', {'a': 1}), ('bb', {'b':2})]
>>> inquirer.list_input('Which?', carousel=True, choices=test)
[?] Which?: bb
aa
> bb
{'b': 2}
```
Whereas in 3.2.2 (and 3.2.3) this does... | diff --git a/docs/requirements.txt b/docs/requirements.txt
index 2ea1b1f..be3d7aa 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,3 +1,3 @@
-furo==2023.9.10
+furo==2024.1.29
sphinx==7.2.5
myst_parser==2.0.0
diff --git a/src/inquirer/questions.py b/src/inquirer/questions.py
index 741d778..e1fb427 ... |
magmax__python-inquirer-587 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "examples/path.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/inquirer/questi... | magmax/python-inquirer | b75eca0ee92438df57e7dcbef601422a8a582669 | inquirer.Path rejects valid default paths
The inquirer.Path question currently does not support providing a default under the following conditions:
- `path_type` is set to inquirer.Path.DIRECTORY
- `normalise_to_absolute_path` is set to True
- `exist` is NOT set
The reason for this is due to this line
https:... | diff --git a/docs/usage.md b/docs/usage.md
index f65ed0e..c9e2fc9 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -227,17 +227,6 @@ By default nothing is enforced (`None`)
Path('config_file', 'Point me to your configuration file.', exists=True, path_type=Path.File)
```
-### normalize_to_absolute_path
-
-Argument ... |
magpylib__magpylib-430 | [
{
"changes": {
"added_entities": [
"magpylib/_src/display/disp_utility.py:draw_arrowed_line"
],
"added_modules": [
"magpylib/_src/display/disp_utility.py:draw_arrowed_line"
],
"edited_entities": [
"magpylib/_src/display/disp_utility.py:draw_arrow",
"... | magpylib/magpylib | 8c3050d0fd0ef9111b237bd543bcc8991db9d3f5 | Wrong direction of Line currents
**Describe the bug**
Line currents seem to show wrong directions in some situations
**To Reproduce**
```python
import magpylib as magpy
import numpy as np
current = 10
vert1=np.array([
[-500,-500,-500],
[-500,500,-500],
[-500,500,500],
[-500,-500,500],
... | diff --git a/magpylib/_src/display/disp_utility.py b/magpylib/_src/display/disp_utility.py
index e45ce47a..dd18e77d 100644
--- a/magpylib/_src/display/disp_utility.py
+++ b/magpylib/_src/display/disp_utility.py
@@ -31,15 +31,22 @@ def place_and_orient_model3d(
return {**model_dict, xyz[0]: x, xyz[1]: y, xyz[2]: z,... |
magpylib__magpylib-532 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"magpylib/_src/obj_classes/class_BaseGeo.py:BaseGeo.copy"
],
"edited_modules": [
"magpylib/_src/obj_classes/class_BaseGeo.py:BaseGeo"
]
},
"file": "magpylib/_src/obj_cla... | magpylib/magpylib | 7c7e30e851bd01ee5ce804b37972f1ca3dde12bf | Source collection order bug
### Magpylib version
4.x (Latest)
### What happened?
From @BillyTheKidPhysicist via Email:
... I have found that if I have a collection of sources and iterate through them as “for src in collection”, the order changed mid iteration if inside the loop I do “src.copy()”. I’ve attac... | diff --git a/magpylib/_src/obj_classes/class_BaseGeo.py b/magpylib/_src/obj_classes/class_BaseGeo.py
index fd69894f..4ae51830 100644
--- a/magpylib/_src/obj_classes/class_BaseGeo.py
+++ b/magpylib/_src/obj_classes/class_BaseGeo.py
@@ -338,11 +338,13 @@ class BaseGeo(BaseTransform):
# pylint: disable=import-out... |
magpylib__magpylib-642 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"magpylib/_src/fields/field_BH_line.py:current_line_field"
],
"edited_modules": [
"magpylib/_src/fields/field_BH_line.py:current_line_field"
]
},
"file": "magpylib/_src/... | magpylib/magpylib | 956206360a47a6fb0307bba88592b13b03653acf | `current.Line` accepts discontinuous lines, but fails silently on `getB`
### Magpylib version
4.x (Latest)
### What happened?
The `current.Line` source currently accepts discontinuous lines, but fails on `getB` without warning.
```python
import magpylib as magpy
line12 = magpy.current.Line(
curre... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb3a9a72..43925140 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,8 +3,9 @@ All notable changes to magpylib are documented here.
# Releases
-## [4.3.x]
+## [4.4.0]
- include self-intersection check in `TriangularMesh` ([#589](https://github.com/magpylib/magpyli... |
magpylib__magpylib-706 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"magpylib/_src/fields/field_BH_cylinder.py:magnet_cylinder_field"
],
"edited_modules": [
"magpylib/_src/fields/field_BH_cylinder.py:magnet_cylinder_field"
]
},
"file": "... | magpylib/magpylib | 9413f2210f63b78c899e39701502d41f14d7c7d1 | H-field inside for Cylinder and Cylinder Segment does not match
### Magpylib version
4.x (Latest)
### What happened?
When computing the H-field inside a cylinder, the values do not match the values obtained with an equivalent cylinder segment.
@OrtnerMichael Shall we wait for the v5 release or make a hotf... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 31111ad4..d740eb9e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -25,7 +25,7 @@ repos:
- repo: https://github.com/psf/black
- rev: "23.12.0"
+ rev: "23.12.1"
hooks:
- id: black
diff --git a/magpylib/_... |
magpylib__magpylib-789 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"magpylib/_src/display/traces_generic.py:MagpyMarkers.get_trace"
],
"edited_modules": [
"magpylib/_src/display/traces_generic.py:MagpyMarkers"
]
},
"file": "magpylib/_sr... | magpylib/magpylib | 4ebdc966432c2fd2e579b13b0b088c0f8a31093e | Marker-legend is not suppressible
See title :)
```python
import magpylib as magpy
cube = magpy.magnet.Cuboid(
polarization=(1,2,3),
dimension=(1,2,3),
)
cube.show(markers=[(0,0,0)], style_legend_show=True)
```

When working with `boltons.urlutils.URL`, it would be nice for `str(url)` to generate a string version of the URL, the same way it does when executing `url.to_text()`.
As of now it returns `URL('...')`, which is what you would expect when executing `repr()` but not `str()` (as per pyt... | diff --git a/.travis.yml b/.travis.yml
index 685ee76..517970b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,4 @@
language: python
-sudo: false
cache: pip
# Python targets, as defined by https://github.com/travis-ci/travis-build/blob
@@ -28,10 +27,8 @@ matrix:
include:
- python: 3.7
dist: xen... |
mahmoud__boltons-203 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"boltons/funcutils.py:FunctionBuilder.from_func",
"boltons/funcutils.py:FunctionBuilder.get_func"
],
"edited_modules": [
"boltons/funcutils.py:FunctionBuilder"
]
},
... | mahmoud/boltons | 761a8477ba9f0372a4415c588846fd6aa1fb1521 | `boltons.funcutils.wraps` breaks with Python 3 function annotations
Tested with `boltons==17.1.0`
Repro: Executing the following script fails
```python
from boltons.funcutils import wraps
from typing import Optional
def wrap_it(f):
@wraps(f)
def wrapper(self, *args, **kwargs):
f(*args, **kwa... | diff --git a/boltons/funcutils.py b/boltons/funcutils.py
index 1a34373..17ab6d5 100644
--- a/boltons/funcutils.py
+++ b/boltons/funcutils.py
@@ -474,6 +474,7 @@ class FunctionBuilder(object):
'module': lambda: None,
'body': lambda: 'pass',
'indent': lambda: 4,
+ ... |
mahmoud__boltons-205 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"boltons/queueutils.py:BasePriorityQueue"
]
},
"file": "boltons/queueutils.py"
}
] | mahmoud/boltons | a065dc576c1dc01e9539d973dfb961591ecee427 | Priority queue does not support float priorities
Through a lot of painful debugging in a larger codebase, I found that both of boltons priority queue implementations treat a float priority `p` as if it were `int(p)`.
```
In [1]: from boltons.queueutils import PriorityQueue
In [2]: items = [('a', 0.8), ('b', 0.9)... | diff --git a/boltons/queueutils.py b/boltons/queueutils.py
index 59d478a..e061e16 100644
--- a/boltons/queueutils.py
+++ b/boltons/queueutils.py
@@ -68,12 +68,12 @@ class BasePriorityQueue(object):
Args:
priority_key (callable): A function that takes *priority* as
- passed in by :meth:`add` a... |
mahmoud__boltons-298 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"boltons/urlutils.py:URL.navigate"
],
"edited_modules": [
"boltons/urlutils.py:URL"
]
},
"file": "boltons/urlutils.py"
}
] | mahmoud/boltons | 270e974975984f662f998c8f6eb0ebebd964de82 | URL.navigate fails with path in base URL
The following and several permutations fail attempting to concatenate a `tuple` with a `list`:
```
URL('http://localhost').navigate('a').navigate('b')
```
Result:
```
...
else: # relative path
> new_path_parts = list(self.path_parts[:-1]) +... | diff --git a/boltons/urlutils.py b/boltons/urlutils.py
index 6016e8a..7462ed4 100644
--- a/boltons/urlutils.py
+++ b/boltons/urlutils.py
@@ -685,7 +685,8 @@ class URL(object):
if dest.path.startswith(u'/'): # absolute path
new_path_parts = list(dest.path_parts)
else: # rela... |
mahmoud__boltons-302 | [
{
"changes": {
"added_entities": [
"boltons/ioutils.py:SpooledIOBase._checkClosed",
"boltons/ioutils.py:SpooledIOBase.writelines",
"boltons/ioutils.py:SpooledIOBase.__next__",
"boltons/ioutils.py:SpooledIOBase.__del__"
],
"added_modules": null,
"edited_ent... | mahmoud/boltons | 9420cfeb3b1eb270fad876d002bf92567e619b0c | daterange(start, stop, inclusive=True) returns an infinite iterator when start is same as stop
expected to get `start` exactly once. | diff --git a/boltons/ioutils.py b/boltons/ioutils.py
index ef3947e..dd67aaf 100644
--- a/boltons/ioutils.py
+++ b/boltons/ioutils.py
@@ -40,7 +40,7 @@ are useful when dealing with input, output, and bytestreams in a variety of
ways.
"""
import os
-from io import BytesIO
+from io import BytesIO, IOBase
from abc impo... |
mahmoud__boltons-31 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"boltons/tbutils.py:ParsedException.from_string"
],
"edited_modules": [
"boltons/tbutils.py:ParsedException"
]
},
"file": "boltons/tbutils.py"
}
] | mahmoud/boltons | c9b3d2452e4ffe43920874f4f6f2e8fe425ebf00 | ParsedException.from_string produces wrong result when a frame is missing source (such as from eval)
Take this (modified from the original) trace:
```
Traceback (most recent call last):
File "<string>", line 2, in _some_function
File "myfile.py", line 3, in some_other_function
return foo(bar, baz)
MyExc... | diff --git a/.travis.yml b/.travis.yml
index 9f97722..0df3b47 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,4 +6,4 @@ python:
- "pypy"
install: "pip install -r requirements-test.txt"
-script: "py.test --doctest-modules boltons"
+script: "py.test --doctest-modules boltons tests"
diff --git a/boltons/tbutils.py ... |
mahmoud__boltons-338 | [
{
"changes": {
"added_entities": [
"boltons/dictutils.py:OrderedMultiDict.__new__"
],
"added_modules": null,
"edited_entities": [
"boltons/dictutils.py:OrderedMultiDict.__init__"
],
"edited_modules": [
"boltons/dictutils.py:OrderedMultiDict"
]
... | mahmoud/boltons | 475462811ea4f9dea23c8af4cc2b6ead2dc03845 | Non-empty `dictutils.OMD` cannot be loaded from `pickle`
A non-empty `OrderedMultiDict` can be serialized, but cannot be deserialized.
A empty `OrderedMultiDict` can be both serialized and deserialized.
* Python `3.11.3`
* Version `23.0.0`
```python
In [1]: import pickle
In [2]: import boltons.dictutils
... | diff --git a/boltons/dictutils.py b/boltons/dictutils.py
index 31a1951..d74abb9 100644
--- a/boltons/dictutils.py
+++ b/boltons/dictutils.py
@@ -71,8 +71,10 @@ thanks to `Mark Williams`_ for all his help.
try:
from collections.abc import KeysView, ValuesView, ItemsView
+ PY3 = True
except ImportError:
... |
mahmoud__boltons-341 | [
{
"changes": {
"added_entities": [
"boltons/dictutils.py:OrderedMultiDict.__ior__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"boltons/dictutils.py:OrderedMultiDict"
]
},
"file": "boltons/dictutils.py"
}
] | mahmoud/boltons | c2b04b4cb16410d7bf9ff781c78dee3ca908dc32 | Support in-place union for `dictutils.OrderedMultiDict`
Not sure if this is a feature request or bug since `OMD` inherits from `dict`.
Python `3.11.3`
Version `23.0.0`
```python
# union with a `dict`
In [2]: a = boltons.dictutils.OrderedMultiDict({'a': 1})
In [3]: a | {'c': 4}
Out[3]: {'a': 1, 'c': 4}
I... | diff --git a/boltons/dictutils.py b/boltons/dictutils.py
index d74abb9..cc70d3c 100644
--- a/boltons/dictutils.py
+++ b/boltons/dictutils.py
@@ -386,6 +386,10 @@ class OrderedMultiDict(dict):
def __ne__(self, other):
return not (self == other)
+ def __ior__(self, other):
+ self.update(other)
+... |
mahmoud__glom-49 | [
{
"changes": {
"added_entities": [
"glom/core.py:_TType.__getstate__",
"glom/core.py:_TType.__setstate__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"glom/core.py:_TType"
]
},
"file": "glom/core.py"
}
] | mahmoud/glom | 917343ee7d3576a7497ec348f6fb2e94d239acb0 | KeyError in _t_child from weakref
I'm running into a weird issue using glom in PySpark on Databricks.
This expression:
`glom(ping, (T[stub]["values"].values(), sum), default=0)`
(where `stub` is `"a11y_time"`)
is consistently throwing this exception when I run it on my real data:
```
/databricks/spark/p... | diff --git a/glom/core.py b/glom/core.py
index 69ae4dc..9cbd27b 100644
--- a/glom/core.py
+++ b/glom/core.py
@@ -721,6 +721,12 @@ class _TType(object):
def __repr__(self):
return _format_t(_T_PATHS[self][1:])
+ def __getstate__(self):
+ return tuple(_T_PATHS[self])
+
+ def __setstate__(self... |
mahmoud__glom-69 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"glom/mutable.py:Assign.__init__",
"glom/mutable.py:Assign.glomit",
"glom/mutable.py:assign"
],
"edited_modules": [
"glom/mutable.py:Assign",
"glom/mutable.py:... | mahmoud/glom | ab822e39ca897f687bd84b620896bd9097de119f | deeply nested setting
I work on a project that flings around deeply nested Python structures with wild abandon. glom nicely handles the "get something from this structure even if all the branches of the path aren't there" and now I can replace some code I wrote. Yay!
The other side of things that I need to handle is... | diff --git a/glom/mutable.py b/glom/mutable.py
index d84eda6..ee605b7 100644
--- a/glom/mutable.py
+++ b/glom/mutable.py
@@ -4,7 +4,7 @@ This module contains Specs that perform mutations.
import operator
from pprint import pprint
-from .core import Path, T, S, Spec, glom, UnregisteredTarget, GlomError
+from .core i... |
mailgun__talon-135 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "talon/quotations.py"
}
] | mailgun/talon | 0b55e8fa778ef3927b68a542ee4f3e289549cd83 | Quotes extraction failed with Polymail replies
Replies initiated from [polymail](https://polymail.io/) do not extract the quoted text.
Steps to reproduce:
1. Send a message to yourself using polymail
2. Read that message in gmail and reply to it
3. Read the message in polymail and reply to it
4. Get the original... | diff --git a/talon/quotations.py b/talon/quotations.py
index 6016310..9286209 100644
--- a/talon/quotations.py
+++ b/talon/quotations.py
@@ -146,6 +146,14 @@ RE_ANDROID_WROTE = re.compile(u'[\s]*[-]+.*({})[ ]*[-]+'.format(
'wrote'
))), re.I)
+# Support polymail.io reply format
+# On Tue, Apr 11, 2017 at... |
makcedward__nlpaug-169 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nlpaug/augmenter/char/char_augmenter.py:CharAugmenter._get_aug_idxes"
],
"edited_modules": [
"nlpaug/augmenter/char/char_augmenter.py:CharAugmenter"
]
},
"file": "nlpau... | makcedward/nlpaug | 944d3a269126da7362781b1421688a0d88d3b9d2 | Bugfix for issue #203539
I think there is a bug in the char augmenter:
https://github.com/makcedward/nlpaug/blob/5238e0be734841b69651d2043df535d78a8cc594/nlpaug/augmenter/char/char_augmenter.py#L98
the behavior is not consistent with that of the word augmenter:
https://github.com/makcedward/nlpaug/blob/5238e0b... | diff --git a/nlpaug/augmenter/char/char_augmenter.py b/nlpaug/augmenter/char/char_augmenter.py
index be44785..c431ac5 100755
--- a/nlpaug/augmenter/char/char_augmenter.py
+++ b/nlpaug/augmenter/char/char_augmenter.py
@@ -95,7 +95,7 @@ class CharAugmenter(Augmenter):
exception = WarningException(name=Wa... |
makepath__xarray-spatial-636 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"xrspatial/classify.py:_run_numpy_jenks_matrices",
"xrspatial/classify.py:_run_jenks"
],
"edited_modules": [
"xrspatial/classify.py:_run_numpy_jenks_matrices",
"xrspat... | makepath/xarray-spatial | 4df552cb70ae2f6f07b4325bcbf6a1b2afdb6718 | Improvements to tests
Recently there have been some big improvements to the tests, such as PRs #612 and #613. Here are a few other possible improvements.
- [x] Tests using 2D arrays should always have `shape[0] != shape[1]`, just in case there are array transpose errors anywhere. e.g. `test_focal.py`s `convolve_2d... | diff --git a/benchmarks/asv.conf.json b/benchmarks/asv.conf.json
index 9404957..73d0ad1 100644
--- a/benchmarks/asv.conf.json
+++ b/benchmarks/asv.conf.json
@@ -73,7 +73,7 @@
"matrix": {
"pyct": [],
// Optional for cupy support; use correct cuda version.
- //"cupy-cuda101": [],
+ //... |
makepath__xarray-spatial-654 | [
{
"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": [
"xrspatial/classify.py:_cpu_... | makepath/xarray-spatial | 3832d1cb0605788fdae893075dc768521019d87a | Modernise build system
We need to modernise our build system to use PEP517 and PEP518, i.e. a migration from configuration in `setup.py` to `setup.cfg` and `pyproject.toml` instead. See https://setuptools.pypa.io/en/latest/build_meta.html
| diff --git a/.appveyor.yml b/.appveyor.yml
index 7a0fb97..a237c5e 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -10,9 +10,7 @@ environment:
build: off
install:
- - "%PYTHON%\\python.exe -m pip install wheel"
- - "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- - "%PYTHON%\\python.exe -m pip instal... |
makerslocal__dooblr-28 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dooblr/config.py:MeasurementConfig._parse",
"dooblr/config.py:MeasurementConfig.save_default_config"
],
"edited_modules": [
"dooblr/config.py:MeasurementConfig"
]
}... | makerslocal/dooblr | 6c73cbc543a68b8112f9c6eb748d8a44ee100ee0 | Make tags optional, not required, for a message to be valid | diff --git a/README.rst b/README.rst
index 6306c32..b1bd1f1 100644
--- a/README.rst
+++ b/README.rst
@@ -58,7 +58,7 @@ configs are used to tell **dooblr** which topics and pieces of data need to be p
Let's say you have a device that publishes to the ``home/kitchen/fridge/temperature`` and
``home/kitchen/freezer/tempe... |
makhidkarun__traveller_pyroute-58 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"PyRoute/AllyGen.py:AllyGen.__init__",
"PyRoute/AllyGen.py:AllyGen.population_align"
],
"edited_modules": [
"PyRoute/AllyGen.py:AllyGen"
]
},
"file": "PyRoute/Al... | makhidkarun/traveller_pyroute | eb0e5a2378d0b66c7482b49e1413921bee36ea79 | Update / Fix some missing allegiance codes
The following are changes to allegiance codes that don't work correctly with the current PyRoute:
* `Kc` is a "K'kree Client state and should be a non-aligned
* The sophont code for the K'kree is "KXkr, which only affects the upload to the wiki.
* The SELK allegiance sh... | diff --git a/PyRoute/AllyGen.py b/PyRoute/AllyGen.py
index 1f0dca2..8d9d1c5 100644
--- a/PyRoute/AllyGen.py
+++ b/PyRoute/AllyGen.py
@@ -16,9 +16,9 @@ class AllyGen(object):
"""
classdocs
"""
- noOne = ['--', '??', 'Xx']
- nonAligned = ['Na', 'Ns', 'Va', 'Cs', 'Hc',
- 'NaHv', 'NaDr... |
makridenko__supadantic-21 | [
{
"changes": {
"added_entities": [
"supadantic/models.py:ModelMetaclass.__new__"
],
"added_modules": [
"supadantic/models.py:ModelMetaclass"
],
"edited_entities": [
"supadantic/models.py:BaseSBModel.all",
"supadantic/models.py:BaseSBModel.filter",
... | makridenko/supadantic | d5f8eae9b4d1275a232ff293e1c5adf7c48794d4 | Remove `QSet` methods from `BaseSBModel`
It should be more like `django orm`-style
```python
User.objects.all()
User.objects.filter()
User.objects.exclude()
User.objects.update()
User.objects.delete()
``` | diff --git a/README.md b/README.md
index ffa372c..a352ce4 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ non_active_user = User(is_active=False)
non_active_user.save()
# Get all users
-users = User.all()
+users = User.objects.all()
# Count users
users.count()
@@ -44,15 +44,15 @@ users.first()
users.l... |
malte-soe__dataclass-cli-10 | [
{
"changes": {
"added_entities": [
"dataclass_cli/parser.py:_add_type_basic",
"dataclass_cli/parser.py:_add_type_list"
],
"added_modules": [
"dataclass_cli/parser.py:_add_type_basic",
"dataclass_cli/parser.py:_add_type_list"
],
"edited_entities": [
... | malte-soe/dataclass-cli | 3187e45171143835d277b872af8e2f9e02d465c9 | Custom name also needs to be lower case | diff --git a/dataclass_cli/parser.py b/dataclass_cli/parser.py
index 14db656..99715be 100644
--- a/dataclass_cli/parser.py
+++ b/dataclass_cli/parser.py
@@ -2,13 +2,13 @@ import argparse
import dataclasses
import enum
import logging
+import typing
from functools import partial
-from typing import Dict, List, Union
... |
malte-soe__dataclass-cli-2 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "dataclass_cli/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"dataclass_cli/parser.py:Options"
],... | malte-soe/dataclass-cli | 78aa811ec0f7605985dc3a872e5de6f1f7f0363f | Ability to add help messages and choices | diff --git a/dataclass_cli/__init__.py b/dataclass_cli/__init__.py
index 55577c1..5e7425b 100644
--- a/dataclass_cli/__init__.py
+++ b/dataclass_cli/__init__.py
@@ -1,1 +1,1 @@
-from dataclass_cli.parser import add
+from dataclass_cli.parser import Options, add
diff --git a/dataclass_cli/parser.py b/dataclass_cli/parse... |
malte-soe__dataclass-cli-6 | [
{
"changes": {
"added_entities": [
"dataclass_cli/parser.py:_add"
],
"added_modules": [
"dataclass_cli/parser.py:_add"
],
"edited_entities": [
"dataclass_cli/parser.py:add"
],
"edited_modules": [
"dataclass_cli/parser.py:add"
]
... | malte-soe/dataclass-cli | 77350a5c3ae2390a272e061a707d347e723cc977 | Customize group name
Currently the decorator uses the class name as group name. Add ability to set a custom group name | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 35e558f..3cc4d10 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -1,5 +1,8 @@
name: Codecoverage
-on: [push]
+on:
+ pull_request:
+ push:
+ branches: [master]
jobs:
run:
runs-on: ubuntu-... |
manicmaniac__sqlalchemy-repr-7 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlalchemy_repr.py:Repr._iter_attrs"
],
"edited_modules": [
"sqlalchemy_repr.py:Repr"
]
},
"file": "sqlalchemy_repr.py"
}
] | manicmaniac/sqlalchemy-repr | cbeb823d5f1953aa4f59617e32c1eca4033ff0f2 | Allow for whitelist/blacklist list of fields
Some of my models have data columns that are much too verbose to print, it would be great if I could easily specify a whitelist/blacklist of fields that should be shown or hidden.
Perhaps something like this:
```
class SomeModel(Base):
...
repr_blacklist = {... | diff --git a/sqlalchemy_repr.py b/sqlalchemy_repr.py
index 7d011b0..eb9ee8f 100644
--- a/sqlalchemy_repr.py
+++ b/sqlalchemy_repr.py
@@ -11,7 +11,6 @@ try:
except ImportError:
from repr import Repr as _Repr
-
__all__ = ['Repr', 'PrettyRepr', 'RepresentableBase',
'PrettyRepresentableBase']
@@ -46,... |
manmartgarc__stochatreat-26 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/stochatreat/__about__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/sto... | manmartgarc/stochatreat | a8c6e14e33554298a51a5f7b571cb9822780922d | Rounding error in assignment probabilities
I noticed that the check for whether the assignment probabilities passed to the `probs` argument is equal to 1 can fail due to a rounding error. As expected, this happens because fractions are converted to floats, which introduces some imprecision. The code excerpt below is wh... | diff --git a/src/stochatreat/__about__.py b/src/stochatreat/__about__.py
index 39e62e7..5d7942c 100644
--- a/src/stochatreat/__about__.py
+++ b/src/stochatreat/__about__.py
@@ -1,2 +1,2 @@
# pragma: no cover
-__version__ = "0.0.19"
+__version__ = "0.0.20"
diff --git a/src/stochatreat/stochatreat.py b/src/stochatreat/s... |
mantidproject__mslice-848 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mslice/models/colors.py:name_to_color",
"mslice/models/colors.py:color_to_name"
],
"edited_modules": [
"mslice/models/colors.py:name_to_color",
"mslice/models/colors.... | mantidproject/mslice | 20540deb709899eaef6a6dd7c1f8b4f4f59cebcc | MSlice crashes upon opening plot options for a non-supported colour
**Describe the bug**
If using a script (probably old) to generate a cut plot that uses a colour that we don't "support", when opening plot options `mslice` crashes.
**To Reproduce**
Steps to reproduce the behaviour:
1. Plot any cut
2. Generate... | diff --git a/mslice/models/colors.py b/mslice/models/colors.py
index c90dd0fb..fc88053d 100644
--- a/mslice/models/colors.py
+++ b/mslice/models/colors.py
@@ -18,6 +18,8 @@ the string cyan
"""
from __future__ import (absolute_import, division)
+import re
+
from matplotlib import rcParams
from six import iterite... |
manubot__manubot-345 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"manubot/cite/isbn.py:get_isbn_csl_item_citoid"
],
"edited_modules": [
"manubot/cite/isbn.py:get_isbn_csl_item_citoid"
]
},
"file": "manubot/cite/isbn.py"
}
] | manubot/manubot | a2ba5780fbbdef9dfc063180b98e6dea500aec48 | manubot cite supplies the first name and last name swapped
This behavior already started a couple of weeks ago:
```
$ manubot cite isbn:9789027416261
## WARNING
Error parsing search_query output as JSON for isbn:9789027416261:
No items returned from any translator
## WARNING
Error in get_isbn_csl_item_zotero f... | diff --git a/manubot/cite/isbn.py b/manubot/cite/isbn.py
index ffe64c9..b9ceec5 100644
--- a/manubot/cite/isbn.py
+++ b/manubot/cite/isbn.py
@@ -100,7 +100,7 @@ def get_isbn_csl_item_citoid(isbn: str):
csl_item["title"] = mediawiki["title"]
if "author" in mediawiki:
csl_author = list()
- f... |
manuzhang__mkdocs-htmlproofer-plugin-41 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"htmlproofer/plugin.py:HtmlProoferPlugin.get_external_url"
],
"edited_modules": [
"htmlproofer/plugin.py:HtmlProoferPlugin"
]
},
"file": "htmlproofer/plugin.py"
}
] | manuzhang/mkdocs-htmlproofer-plugin | 49593db56e70148e48e04042d04d60075eda908c | Visual Studio Marketplace URLs cause an "invalid url" [404] error
When the URL of a VS Code extension on the Visual Studio Marketplace is referenced in a document, the plugin causes mkdocs to fail with an "invalid url" [404] error.
**To Reproduce**
Create a document, **index.md**, with the following line of markdow... | diff --git a/htmlproofer/plugin.py b/htmlproofer/plugin.py
index cb67b70..48c816e 100644
--- a/htmlproofer/plugin.py
+++ b/htmlproofer/plugin.py
@@ -87,7 +87,7 @@ class HtmlProoferPlugin(BasePlugin):
@lru_cache(maxsize=1000)
def get_external_url(self, url: str) -> int:
try:
- response = se... |
manuzhang__mkdocs-htmlproofer-plugin-51 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"htmlproofer/plugin.py:HtmlProoferPlugin.contains_anchor"
],
"edited_modules": [
"htmlproofer/plugin.py:HtmlProoferPlugin"
]
},
"file": "htmlproofer/plugin.py"
}
] | manuzhang/mkdocs-htmlproofer-plugin | 1d13c627fb03245067b8cf523352cf9b3e9a41c9 | Anchors in attr_list contains other attribute value are reported as invalid urls
**Describe the bug**
For example, the following header is reported as invalid url.
```md
## Header {: #header-anchor .class-name }
```
anchor_slug: header-anchor-class-name
https://github.com/manuzhang/mkdocs-htmlproofer-plugin... | diff --git a/README.md b/README.md
index 2c91a82..57582ed 100644
--- a/README.md
+++ b/README.md
@@ -113,6 +113,19 @@ plugins:
validate_rendered_template: True
```
+## Compatibility with `attr_list` extension
+
+If you need to manually specify anchors make use of the `attr_list` [extension](https://python-mar... |
manuzhang__mkdocs-htmlproofer-plugin-53 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"htmlproofer/plugin.py:HtmlProoferPlugin.find_source_file",
"htmlproofer/plugin.py:HtmlProoferPlugin.contains_anchor"
],
"edited_modules": [
"htmlproofer/plugin.py:HtmlProofer... | manuzhang/mkdocs-htmlproofer-plugin | 1d13c627fb03245067b8cf523352cf9b3e9a41c9 | Validation of root path local referenced image links fails
When referencing image links to a root path the validation fails (while mkdocs itself suceeds for the image).
Given this example: (Root referencing required for common language shared between multilingual folders)
```markdown

`... | diff --git a/README.md b/README.md
index 2c91a82..57582ed 100644
--- a/README.md
+++ b/README.md
@@ -113,6 +113,19 @@ plugins:
validate_rendered_template: True
```
+## Compatibility with `attr_list` extension
+
+If you need to manually specify anchors make use of the `attr_list` [extension](https://python-mar... |
manuzhang__mkdocs-htmlproofer-plugin-57 | [
{
"changes": {
"added_entities": [
"htmlproofer/plugin.py:log_info",
"htmlproofer/plugin.py:log_warning",
"htmlproofer/plugin.py:log_error",
"htmlproofer/plugin.py:HtmlProoferPlugin.resolve_web_scheme"
],
"added_modules": [
"htmlproofer/plugin.py:log_inf... | manuzhang/mkdocs-htmlproofer-plugin | c0126179bae5baa74a9ab142eb32ea62e56320d7 | mailto: links generate 404 errors
If the document contains mailto: links the plugin returns 404 for each of them.
**To Reproduce**
create a mailto: link (for example `mailto:toto@toto.com`) in a source .md file and build your documentation.
It should simply ignore mailto links. | diff --git a/htmlproofer/plugin.py b/htmlproofer/plugin.py
index 1405652..5420840 100644
--- a/htmlproofer/plugin.py
+++ b/htmlproofer/plugin.py
@@ -1,13 +1,14 @@
-from functools import lru_cache
+from functools import lru_cache, partial
import os.path
import pathlib
import re
-import sys
from typing import Dict, O... |
manuzhang__mkdocs-htmlproofer-plugin-75 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"htmlproofer/plugin.py:HtmlProoferPlugin.on_post_page",
"htmlproofer/plugin.py:HtmlProoferPlugin.get_url_status",
"htmlproofer/plugin.py:HtmlProoferPlugin.find_source_file"
],
... | manuzhang/mkdocs-htmlproofer-plugin | 14c97ccfafe54caca261d739fd495d6d1e7c1a69 | disabling the implicit use_directory_urls renders plugin useless for most
**Describe the bug**
As mkdocs default/implicit settings are `use_directory_urls = true` for good reasons, most people will use that, as it does produce nice, human-friendly URLs without useless html extension.
Still, this plugin fails to p... | diff --git a/README.md b/README.md
index 0eb0eb4..3ee32b6 100644
--- a/README.md
+++ b/README.md
@@ -28,12 +28,6 @@ plugins:
- htmlproofer
```
-To enable cross-page anchor validation, you must set `use_directory_urls = False` in `mkdocs.yml`:
-
-```yaml
-use_directory_urls: False
-```
-
## Configuring
### `... |
mapbox__COGDumper-5 | [
{
"changes": {
"added_entities": [
"cogdumper/cog_tiles.py:COGTiff._ifds"
],
"added_modules": null,
"edited_entities": [
"cogdumper/cog_tiles.py:COGTiff.__init__",
"cogdumper/cog_tiles.py:COGTiff.ifds",
"cogdumper/cog_tiles.py:COGTiff.read_header",
... | mapbox/COGDumper | eb6cbcfbdbc94ee8fd75450908b375fac93e3989 | Implement chunk or stream read to reduce the number of `read` call
Right now when reading the header we have to loop through each FID to get each FID metadata.
https://github.com/mapbox/COGDumper/blob/dfc6b9b56879c7116f522518ed37617d570acba1/cogdumper/cog_tiles.py#L221-L222
While this permit to read only part we n... | diff --git a/cogdumper/cog_tiles.py b/cogdumper/cog_tiles.py
index 0acc0c7..318bb1b 100644
--- a/cogdumper/cog_tiles.py
+++ b/cogdumper/cog_tiles.py
@@ -1,5 +1,7 @@
"""Function for extracting tiff tiles."""
+import os
+
from abc import abstractmethod
from math import ceil
import struct
@@ -41,16 +43,18 @@ class C... |
mapbox__mapbox-sdk-py-124 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mapbox/services/geocoding.py:Geocoder.forward"
],
"edited_modules": [
"mapbox/services/geocoding.py:Geocoder"
]
},
"file": "mapbox/services/geocoding.py"
}
] | mapbox/mapbox-sdk-py | 2f24f1661c1083959c4a0cbd2c1cb33139941a65 | Support geocoding bbox parameter | diff --git a/README.rst b/README.rst
index c20b789..8b6cf8a 100644
--- a/README.rst
+++ b/README.rst
@@ -75,7 +75,7 @@ To run the examples as integration tests on your own Mapbox account
.. code:: bash
- MAPBOX_ACCESS_TOKEN="MY_ACCESS_TOKEN" py.test --doctest-glob='*.md' *.md
+ MAPBOX_ACCESS_TOKEN="MY_ACCESS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.