Skip to content

Commit

Permalink
Re-format Python code with Black
Browse files Browse the repository at this point in the history
* Inserts _ spacers into long numbers (31536000 -> 31_536_000)
* Capitalized hexadecimal numbers (0x2b -> 0x2B)
  • Loading branch information
mythmon committed Oct 8, 2018
1 parent 0460d60 commit ebbda7d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contract-tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_static_cache_headers(conf, requests_session):
script_req.raise_for_status()
cache_control = parse_cache_control(script_req.headers["cache-control"])
assert cache_control["public"], f"Cache-control: public for {url}"
ONE_YEAR = 31536000
ONE_YEAR = 31_536_000
assert cache_control["max-age"] >= ONE_YEAR, f"Cache-control: max-age > 1 year for {url}"
assert cache_control["immutable"], f"Cache-control: immutable for {url}"

Expand Down
26 changes: 13 additions & 13 deletions normandy/recipes/api/v2/shield_identicon.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ class Genome(random.Random):

# Colors taken from the Solarized color scheme (http://ethanschoonover.com/solarized)
colors = [
Color(0x00, 0x2b, 0x36),
Color(0x00, 0x2B, 0x36),
Color(0x07, 0x36, 0x42),
Color(0x58, 0x6e, 0x75),
Color(0x65, 0x7b, 0x83),
Color(0x58, 0x6E, 0x75),
Color(0x65, 0x7B, 0x83),
Color(0x83, 0x94, 0x96),
Color(0x93, 0xa1, 0xa1),
Color(0xee, 0xe8, 0xd5),
Color(0xfd, 0xf6, 0xe3),
Color(0xff, 0xcf, 0x00), # alternate yellow color
Color(0xcb, 0x4b, 0x16),
Color(0xdc, 0x32, 0x2f),
Color(0xd3, 0x36, 0x82),
Color(0x6c, 0x71, 0xc4),
Color(0x26, 0x8b, 0xd2),
Color(0x2a, 0xa1, 0x98),
Color(0x93, 0xA1, 0xA1),
Color(0xEE, 0xE8, 0xD5),
Color(0xFD, 0xF6, 0xE3),
Color(0xFF, 0xCF, 0x00), # alternate yellow color
Color(0xCB, 0x4B, 0x16),
Color(0xDC, 0x32, 0x2F),
Color(0xD3, 0x36, 0x82),
Color(0x6C, 0x71, 0xC4),
Color(0x26, 0x8B, 0xD2),
Color(0x2A, 0xA1, 0x98),
Color(0x85, 0x99, 0x00),
]

Expand Down

0 comments on commit ebbda7d

Please sign in to comment.