Skip to content

Commit 8f9aceb

Browse files
authored
Changes to add docformatter configuration (#310)
1 parent 8ad792b commit 8f9aceb

5 files changed

Lines changed: 31 additions & 10 deletions

File tree

dfdatetime/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Digital Forensics Date and Time (dfDateTime).
22
3-
dfDateTime, or Digital Forensics date and time, provides date and time objects
4-
to preserve accuracy and precision.
3+
dfDateTime, or Digital Forensics date and time, provides date and time objects to
4+
preserve accuracy and precision.
55
"""
66

77
# Imports for date time values factory.

dfdatetime/dotnet_datetime.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def __init__(self):
1818
class DotNetDateTime(interface.DateTimeValues):
1919
""".NET DateTime ticks.
2020
21-
The .NET DateTime timestamp is a 64-bit signed integer that contains the date
22-
and time as the number of 100 nanoseconds since 12:00 AM January 1, year 1
23-
A.D. in the proleptic Gregorian Calendar.
21+
The .NET DateTime timestamp is a 64-bit signed integer that contains the date and
22+
time as the number of 100 nanoseconds since 12:00 AM January 1, year 1 A.D. in the
23+
proleptic Gregorian Calendar.
2424
"""
2525

2626
_EPOCH = DotNetDateTimeEpoch()
@@ -48,7 +48,7 @@ def __init__(self, precision=None, time_zone_offset=None, timestamp=None):
4848

4949
@property
5050
def timestamp(self):
51-
"""integer: .NET DateTime timestamp or None if not set."""
51+
"""int: .NET DateTime timestamp or None if not set."""
5252
return self._timestamp
5353

5454
def _GetNormalizedTimestamp(self):

dfdatetime/precisions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class DateTimePrecisionHelper:
1010
1111
This is the super class of different date and time precision helpers.
1212
13-
Time precision helpers provide functionality for converting date and time
14-
values between different precisions.
13+
Time precision helpers provide functionality for converting date and time values
14+
between different precisions.
1515
"""
1616

1717
# pylint: disable=missing-raises-doc,redundant-returns-doc

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@ line-length = 88
2828
target-version = ["py310"]
2929
include = "\\.pyi?$"
3030

31+
[tool.docformatter]
32+
black = true
33+
non-cap = ["bytes:", "dfDateTime", "float:", "int:", "str:"]
34+
non-strict = true
35+
3136
[tool.setuptools]
3237
package-dir = {"dfdatetime" = "dfdatetime"}

tox.ini

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py3{10,11,12,13,14},black,coverage,docs,pylint,wheel
2+
envlist = py3{10,11,12,13,14},black,coverage,docformatter,docs,pylint,wheel
33

44
[testenv]
55
allowlist_externals = ./run_tests.py
@@ -37,7 +37,23 @@ deps =
3737
setuptools >= 65
3838
commands =
3939
black --version
40-
black --check .
40+
black .
41+
42+
[testenv:docformatter]
43+
skipsdist = True
44+
pip_pre = True
45+
passenv =
46+
CFLAGS
47+
CPPFLAGS
48+
LDFLAGS
49+
setenv =
50+
PYTHONPATH = {toxinidir}
51+
deps =
52+
docformatter
53+
setuptools >= 65
54+
commands =
55+
docformatter --version
56+
docformatter --in-place --recursive dfdatetime tests
4157

4258
[testenv:docs]
4359
usedevelop = True

0 commit comments

Comments
 (0)