Skip to content

Commit

Permalink
Merge pull request #2007 from beautify-web/bitwiseman-patch-2
Browse files Browse the repository at this point in the history
Remove lock on python black version
  • Loading branch information
bitwiseman committed Mar 29, 2022
2 parents 3be5c35 + a0f390f commit 66a95b0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -143,7 +143,7 @@ $(BUILD_DIR)/virtualenv: | $(BUILD_DIR)
virtualenv --version || pip install virtualenv
virtualenv build/python-dev
virtualenv build/python-rel
$(SCRIPT_DIR)/python-dev3 pip install black==21.12b0
$(SCRIPT_DIR)/python-dev3 pip install black
@touch $(BUILD_DIR)/virtualenv


Expand Down
16 changes: 6 additions & 10 deletions python/jsbeautifier/javascript/beautifier.py
Expand Up @@ -1462,16 +1462,12 @@ def handle_operator(self, current_token):
elif self._flags.last_token.type == TOKEN.OPERATOR:
# a++ + ++b
# a - -b
space_before = (
current_token.text
in [
"--",
"-",
"++",
"+",
]
and self._flags.last_token.text in ["--", "-", "++", "+"]
)
space_before = current_token.text in [
"--",
"-",
"++",
"+",
] and self._flags.last_token.text in ["--", "-", "++", "+"]
# + and - are not unary when preceeded by -- or ++ operator
# a-- + b
# a * +b
Expand Down
2 changes: 1 addition & 1 deletion python/jsbeautifier/unpackers/packer.py
Expand Up @@ -157,5 +157,5 @@ def _dictunbaser(self, string):
"""Decodes a value to an integer."""
ret = 0
for index, cipher in enumerate(string[::-1]):
ret += (self.base ** index) * self.dictionary[cipher]
ret += (self.base**index) * self.dictionary[cipher]
return ret
2 changes: 1 addition & 1 deletion python/pyproject.toml
@@ -1,5 +1,5 @@
[tool.black]
target-version = ['py27', 'py36', 'py37', 'py38']
target-version = ['py33', 'py36', 'py37', 'py38']
exclude = '''
/(
\.eggs
Expand Down

0 comments on commit 66a95b0

Please sign in to comment.