Skip to content

Commit

Permalink
refactor: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhd1701 committed Nov 22, 2021
1 parent b85c554 commit d0ff8ba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gridplayer/dialogs/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate_attributions(attributions):
version = f" {a.version}" if a.version else ""

attributions_txt.append(
f"<p><b>{a.title}{version}</b>"
f"<p><b>{a.title}{version}</b>" # noqa: WPS221
f' by <a href="{a.url}">{a.author}</a><br>'
f"<i>Licensed under {a.license}</i></p>"
)
Expand Down
2 changes: 1 addition & 1 deletion gridplayer/main/init_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ def _init_resources():
fonts = QDirIterator(":/fonts", ("*.ttf",), QDir.Files)

while fonts.hasNext():
font = fonts.next()
font = fonts.next() # noqa: B305
QFontDatabase.addApplicationFont(font)
2 changes: 1 addition & 1 deletion gridplayer/player/managers/video_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class VideoBlocksManager(ManagerBase):
def __init__(self, **kwargs):
super().__init__(**kwargs)

self._ctx._is_seek_synced = Settings().get("playlist/seek_synced")
self._ctx.is_seek_synced = Settings().get("playlist/seek_synced")

self._ctx.video_blocks = VideoBlocks()

Expand Down
5 changes: 3 additions & 2 deletions gridplayer/widgets/video_frame_vlc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)

ONE_MOMENT = 0.01
DEFAULT_FPS = 25


class VlcPlayerBase(object):
Expand Down Expand Up @@ -272,7 +273,7 @@ def _extract_meta_parse(self):
if video_track.frame_rate_num and video_track.frame_rate_den:
self.fps = video_track.frame_rate_num / video_track.frame_rate_den
else:
self.fps = 25
self.fps = DEFAULT_FPS

self._is_meta_loaded = True

Expand All @@ -281,7 +282,7 @@ def _extract_meta_play(self):

self.length = self._media.get_duration()
self.video_dimensions = self._media_player.video_get_size()
self.fps = self._media_player.get_fps() or 25
self.fps = self._media_player.get_fps() or DEFAULT_FPS

self._is_meta_loaded = True

Expand Down

0 comments on commit d0ff8ba

Please sign in to comment.