Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# .coveragerc
[report]
show_missing = True
show_missing = True
exclude_lines =
pragma: no cover
# ignore lines contains only ellipsis
^\s*\.\.\.\s*$
16 changes: 8 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
master_doc = "index"

# General information about the project.
project = u"PyFunctional"
copyright = u"2019, Pedro Rodriguez"
author = u"Pedro Rodriguez"
project = "PyFunctional"
copyright = "2019, Pedro Rodriguez"
author = "Pedro Rodriguez"

# 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 @@ -206,7 +206,7 @@

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
latex_elements: dict[str, str] = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
Expand All @@ -224,8 +224,8 @@
(
master_doc,
"PyFunctional.tex",
u"PyFunctional Documentation",
u"Pedro Rodriguez",
"PyFunctional Documentation",
"Pedro Rodriguez",
"manual",
),
]
Expand Down Expand Up @@ -255,7 +255,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "pyfunctional", u"PyFunctional Documentation", [author], 1)]
man_pages = [(master_doc, "pyfunctional", "PyFunctional Documentation", [author], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -270,7 +270,7 @@
(
master_doc,
"PyFunctional",
u"PyFunctional Documentation",
"PyFunctional Documentation",
author,
"PyFunctional",
"One line description of project.",
Expand Down
10 changes: 5 additions & 5 deletions functional/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import io
import builtins

from typing import Optional


WRITE_MODE = "wt"

Expand Down Expand Up @@ -78,7 +80,7 @@ def read(self):


class CompressedFile(ReusableFile):
magic_bytes = None
magic_bytes: Optional[bytes] = None

# pylint: disable=too-many-instance-attributes
def __init__(
Expand Down Expand Up @@ -280,7 +282,7 @@ def read(self):


COMPRESSION_CLASSES = [GZFile, BZ2File, XZFile]
N_COMPRESSION_CHECK_BYTES = max(len(cls.magic_bytes) for cls in COMPRESSION_CLASSES)
N_COMPRESSION_CHECK_BYTES = max(len(cls.magic_bytes) for cls in COMPRESSION_CLASSES) # type: ignore


def get_read_function(filename, disable_compression):
Expand Down Expand Up @@ -352,7 +354,5 @@ def universal_write_open(
)
else:
raise ValueError(
"compression must be None, gz, gzip, lzma, or xz and was {0}".format(
compression
)
f"compression must be None, gz, gzip, lzma, or xz and was {compression}"
)
Loading