Skip to content

Commit

Permalink
Merge pull request #24 from cclauss/ruff
Browse files Browse the repository at this point in the history
Modernize and simplify Python code
  • Loading branch information
MeirKriheli authored Jul 30, 2024
2 parents c24214a + 7a945b9 commit 23577e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
5 changes: 1 addition & 4 deletions bidi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ def main():

options, rest = parser.parse_known_args()

if rest:
lines = rest
else:
lines = sys.stdin
lines = rest or sys.stdin

for line in lines:
display = get_display(
Expand Down
2 changes: 1 addition & 1 deletion bidi/algorithm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import AnyStr, Optional

from .bidi import get_display_inner, get_base_level_inner
from .bidi import get_base_level_inner, get_display_inner


def get_display(
Expand Down
19 changes: 9 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
Expand All @@ -13,8 +12,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sys

# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
Expand Down Expand Up @@ -55,8 +54,8 @@
master_doc = 'index'

# General information about the project.
project = u'Python BiDi'
copyright = u'2014, Meir Kriheli'
project = 'Python BiDi'
copyright = '2014, Meir Kriheli'

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -209,8 +208,8 @@
# [howto/manual]).
latex_documents = [
('index', 'python-bidi.tex',
u'Python BiDi Documentation',
u'Meir Kriheli', 'manual'),
'Python BiDi Documentation',
'Meir Kriheli', 'manual'),
]

# The name of an image file (relative to this directory) to place at
Expand Down Expand Up @@ -240,8 +239,8 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'python-bidi',
u'Python BiDi Documentation',
[u'Meir Kriheli'], 1)
'Python BiDi Documentation',
['Meir Kriheli'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -255,8 +254,8 @@
# dir menu entry, description, category)
texinfo_documents = [
('index', 'python-bidi',
u'Python BiDi Documentation',
u'Meir Kriheli',
'Python BiDi Documentation',
'Meir Kriheli',
'python-bidi',
'One line description of project.',
'Miscellaneous'),
Expand Down

0 comments on commit 23577e8

Please sign in to comment.