Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more black updates
  • Loading branch information
StoicLoofah committed Jan 31, 2022
commit a345354b3f64887fad1bd7d83359edf20a73354a
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
master_doc = "index"

# General information about the project.
project = u"sc2reader"
copyright = u"2011-2013"
project = "sc2reader"
copyright = "2011-2013"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -182,7 +182,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
("index", "sc2reader.tex", u"sc2reader Documentation", u"Graylin Kim", "manual")
("index", "sc2reader.tex", "sc2reader Documentation", "Graylin Kim", "manual")
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -213,4 +213,4 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "sc2reader", u"sc2reader Documentation", [u"Graylin Kim"], 1)]
man_pages = [("index", "sc2reader", "sc2reader Documentation", ["Graylin Kim"], 1)]
2 changes: 1 addition & 1 deletion sc2reader/engine/plugins/creeptracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def radius_to_map_positions(self, radius):
# Sample a square area using the radius
for x in range(-radius, radius):
for y in range(-radius, radius):
if (x ** 2 + y ** 2) <= (radius * radius):
if (x**2 + y**2) <= (radius * radius):
output_coordinates.append((x, y))
return output_coordinates

Expand Down
2 changes: 1 addition & 1 deletion sc2reader/events/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TrackerEvent(Event):
def __init__(self, frames):
#: The frame of the game this event was applied
#: Ignore all but the lowest 32 bits of the frame
self.frame = frames % 2 ** 32
self.frame = frames % 2**32

#: The second of the game (game time not real time) this event was applied
self.second = self.frame >> 4
Expand Down
2 changes: 1 addition & 1 deletion sc2reader/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def __call__(self, data, replay):
)

# Don't want to do this more than once
SINGLE_BIT_MASKS = [0x1 << i for i in range(2 ** 9)]
SINGLE_BIT_MASKS = [0x1 << i for i in range(2**9)]

def read_selection_bitmask(self, data, mask_length):
bits_left = mask_length
Expand Down
6 changes: 3 additions & 3 deletions sc2reader/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@ def load_details(self):
# the value required to get the adjusted timestamp. We know the upper
# limit for any adjustment number so use that to distinguish between
# the two cases.
if details["utc_adjustment"] < 10 ** 7 * 60 * 60 * 24:
self.time_zone = details["utc_adjustment"] / (10 ** 7 * 60 * 60)
if details["utc_adjustment"] < 10**7 * 60 * 60 * 24:
self.time_zone = details["utc_adjustment"] / (10**7 * 60 * 60)
else:
self.time_zone = (details["utc_adjustment"] - details["file_time"]) / (
10 ** 7 * 60 * 60
10**7 * 60 * 60
)

self.game_length = self.length
Expand Down
2 changes: 1 addition & 1 deletion sc2reader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def windows_to_unix(windows_time):
# This windows timestamp measures the number of 100 nanosecond periods since
# January 1st, 1601. First we subtract the number of nanosecond periods from
# 1601-1970, then we divide by 10^7 to bring it back to seconds.
return int((windows_time - 116444735995904000) / 10 ** 7)
return int((windows_time - 116444735995904000) / 10**7)


@loggable
Expand Down