]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Revert "Use lowercase hex numbers fixes #1692 (#1775)"
authorŁukasz Langa <lukasz@langa.pl>
Sun, 25 Apr 2021 17:04:15 +0000 (19:04 +0200)
committerŁukasz Langa <lukasz@langa.pl>
Sun, 25 Apr 2021 17:13:23 +0000 (19:13 +0200)
This reverts commit 7d032fa848c8910007a0a41c1ba61d70d2846f48.

.gitignore
src/black/__init__.py
src/black_primer/primer.json
src/blib2to3/pytree.py
tests/data/numeric_literals.py
tests/data/numeric_literals_py2.py
tests/data/numeric_literals_skip_underscores.py

index 30225ec776437f7e062c45ffb47c10311edf70cd..3207e72ae28c55363363d3b4096b2a3860eb568b 100644 (file)
@@ -1,4 +1,3 @@
-.venv
 .coverage
 _build
 .DS_Store
@@ -16,4 +15,4 @@ src/_black_version.py
 .dmypy.json
 *.swp
 .hypothesis/
-venv/
+venv/
\ No newline at end of file
index 5c9ab7516508b78ee23eebb49fbe934912548554..0a893aa80feba991670b3b51b726e7b5b194b833 100644 (file)
@@ -5351,15 +5351,10 @@ def normalize_numeric_literal(leaf: Leaf) -> None:
 
 def format_hex(text: str) -> str:
     """
-    Formats a hexadecimal string like "0x12b3"
-
-    Uses lowercase because of similarity between "B" and "8", which
-    can cause security issues.
-    see: https://github.com/psf/black/issues/1692
+    Formats a hexadecimal string like "0x12B3"
     """
-
     before, after = text[:2], text[2:]
-    return f"{before}{after.lower()}"
+    return f"{before}{after.upper()}"
 
 
 def format_scientific_notation(text: str) -> str:
index 3a1fae090a01b45e593c2fc75d25f5974ea7c6d3..7f7c3b0f37b4f1c34f8a69ab0aef59dcfc3de916 100644 (file)
@@ -10,7 +10,7 @@
     },
     "attrs": {
       "cli_arguments": [],
-      "expect_formatting_changes": true,
+      "expect_formatting_changes": false,
       "git_clone_url": "https://github.com/python-attrs/attrs.git",
       "long_checkout": false,
       "py_versions": ["all"]
@@ -47,7 +47,7 @@
     },
     "hypothesis": {
       "cli_arguments": [],
-      "expect_formatting_changes": true,
+      "expect_formatting_changes": false,
       "git_clone_url": "https://github.com/HypothesisWorks/hypothesis.git",
       "long_checkout": false,
       "py_versions": ["all"]
@@ -63,7 +63,7 @@
     },
     "pillow": {
       "cli_arguments": [],
-      "expect_formatting_changes": true,
+      "expect_formatting_changes": false,
       "git_clone_url": "https://github.com/python-pillow/Pillow.git",
       "long_checkout": false,
       "py_versions": ["all"]
@@ -77,7 +77,7 @@
     },
     "pyramid": {
       "cli_arguments": [],
-      "expect_formatting_changes": true,
+      "expect_formatting_changes": false,
       "git_clone_url": "https://github.com/Pylons/pyramid.git",
       "long_checkout": false,
       "py_versions": ["all"]
     },
     "virtualenv": {
       "cli_arguments": [],
-      "expect_formatting_changes": true,
+      "expect_formatting_changes": false,
       "git_clone_url": "https://github.com/pypa/virtualenv.git",
       "long_checkout": false,
       "py_versions": ["all"]
index 0c074f6a4ac9d3ead4fc902db6020a246d4951c8..7843467e0129d2c3f281ffab3ff76da7d53001f3 100644 (file)
@@ -33,7 +33,7 @@ __author__ = "Guido van Rossum <guido@python.org>"
 import sys
 from io import StringIO
 
-HUGE: int = 0x7fffffff  # maximum repeat count, default max
+HUGE: int = 0x7FFFFFFF  # maximum repeat count, default max
 
 _type_reprs: Dict[int, Union[Text, int]] = {}
 
index 06b7f7758ee5fe46d7642da7987376d6698660ab..254da68d3308bf76cdf464dbf9aa5a5a74252828 100644 (file)
@@ -12,7 +12,7 @@ x = 123456789.123456789E123456789
 x = 123456789E123456789
 x = 123456789J
 x = 123456789.123456789J
-x = 0Xb1aCc
+x = 0XB1ACC
 x = 0B1011
 x = 0O777
 x = 0.000000006
@@ -36,7 +36,7 @@ x = 123456789.123456789e123456789
 x = 123456789e123456789
 x = 123456789j
 x = 123456789.123456789j
-x = 0xb1acc
+x = 0xB1ACC
 x = 0b1011
 x = 0o777
 x = 0.000000006
index 8b2c7faa3068168e8b6a0623b05c13a104a150e4..8f85c43f2653cf009c772522cb281bad9e73ba25 100644 (file)
@@ -3,7 +3,7 @@
 x = 123456789L
 x = 123456789l
 x = 123456789
-x = 0xB1aCc
+x = 0xb1acc
 
 # output
 
@@ -13,4 +13,4 @@ x = 0xB1aCc
 x = 123456789L
 x = 123456789L
 x = 123456789
-x = 0xb1acc
+x = 0xB1ACC
index f83e23312f21e3740b348989a9e3d08915065b63..e345bb90276c709939125f2e366f45318e973486 100644 (file)
@@ -3,7 +3,7 @@
 x = 123456789
 x = 1_2_3_4_5_6_7
 x = 1E+1
-x = 0xb1AcC
+x = 0xb1acc
 x = 0.00_00_006
 x = 12_34_567J
 x = .1_2
@@ -16,8 +16,8 @@ x = 1_2.
 x = 123456789
 x = 1_2_3_4_5_6_7
 x = 1e1
-x = 0xb1acc
+x = 0xB1ACC
 x = 0.00_00_006
 x = 12_34_567j
 x = 0.1_2
-x = 1_2.0
+x = 1_2.0
\ No newline at end of file