Skip to content

Commit

Permalink
Update validate-pyproject to v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Mar 30, 2022
1 parent 85c815d commit 7a66ab2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setuptools/config/_validate_pyproject/error_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,6 @@ def _child_prefix(self, parent_prefix: str, child_prefix: str) -> str:
def _separate_terms(word: str) -> List[str]:
"""
>>> _separate_terms("FooBar-foo")
"foo bar foo"
['foo', 'bar', 'foo']
"""
return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w]
7 changes: 6 additions & 1 deletion setuptools/config/_validate_pyproject/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,17 @@ class _TroveClassifier:

def __init__(self):
self.downloaded: typing.Union[None, False, typing.Set[str]] = None
self._skip_download = False
# None => not cached yet
# False => cache not available
self.__name__ = "trove_classifier" # Emulate a public function

def _disable_download(self):
# This is a private API. Only setuptools has the consent of using it.
self._skip_download = True

def __call__(self, value: str) -> bool:
if self.downloaded is False:
if self.downloaded is False or self._skip_download is True:
return True

if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ commands =
[testenv:generate-validation-code]
skip_install = True
deps =
validate-pyproject[all]==0.7
validate-pyproject[all]==0.7.1
commands =
python -m tools.generate_validation_code

Expand Down

0 comments on commit 7a66ab2

Please sign in to comment.