diff options
| author | Hugo <hugovk@users.noreply.github.com> | 2019-08-26 09:41:26 +0300 |
|---|---|---|
| committer | Paul Ganssle <paul@ganssle.io> | 2019-08-27 10:56:09 -0400 |
| commit | b7668eaf95bc1bddb02c6e377cfe21c65fccc4c6 (patch) | |
| tree | b1ceca928fa7ef8152a40cc79c81b4ef65f4b479 | |
| parent | c45497893ed4302287de809675fb68198d4f04ff (diff) | |
| download | dateutil-git-b7668eaf95bc1bddb02c6e377cfe21c65fccc4c6.tar.gz | |
Fix typos in comments and documentation
Fixes several misspellings, typos and styling errors (e.g. github ->
GitHub) in the comments and documentation.
| -rw-r--r-- | AUTHORS.md | 2 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 4 | ||||
| -rw-r--r-- | NEWS | 10 | ||||
| -rw-r--r-- | README.rst | 4 | ||||
| -rw-r--r-- | changelog.d/952.misc.rst | 1 | ||||
| -rw-r--r-- | dateutil/parser/_parser.py | 8 | ||||
| -rw-r--r-- | dateutil/relativedelta.py | 2 | ||||
| -rw-r--r-- | dateutil/rrule.py | 2 | ||||
| -rw-r--r-- | dateutil/test/test_internals.py | 2 | ||||
| -rw-r--r-- | dateutil/test/test_parser.py | 2 | ||||
| -rw-r--r-- | dateutil/test/test_relativedelta.py | 2 | ||||
| -rw-r--r-- | dateutil/test/test_tz.py | 2 | ||||
| -rw-r--r-- | dateutil/tz/_common.py | 4 | ||||
| -rw-r--r-- | dateutil/tz/tz.py | 2 | ||||
| -rw-r--r-- | dateutil/utils.py | 2 | ||||
| -rw-r--r-- | docs/examples.rst | 2 | ||||
| -rw-r--r-- | docs/rrule.rst | 2 |
17 files changed, 27 insertions, 26 deletions
@@ -119,4 +119,4 @@ switch, and thus all their contributions are dual-licensed. - ms-boom <ms-boom@MASKED> - ryanss <ryanssdev@MASKED> (gh: @ryanss) **R** -Unless someone has deliberately given permission to publish their e-mail, I have masked the domain names. If you are not on this list and believe you should be, or you *are* on this list and your information is inaccurate, please e-mail the current maintainer or the mailing list (dateutil@python.org) with your name, e-mail (if desired) and github (if desired / applicable), as you would like them displayed. Additionally, please indicate if you are willing to dual license your old contributions under Apache 2.0. +Unless someone has deliberately given permission to publish their e-mail, I have masked the domain names. If you are not on this list and believe you should be, or you *are* on this list and your information is inaccurate, please e-mail the current maintainer or the mailing list (dateutil@python.org) with your name, e-mail (if desired) and GitHub (if desired / applicable), as you would like them displayed. Additionally, please indicate if you are willing to dual license your old contributions under Apache 2.0. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e93dab2..1a1d984 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ This document outlines the ways to contribute to `python-dateutil`. This is a fa ### Bug reports Bug reports are an important type of contribution - it's important to get feedback about how the library is failing, and there's no better way to do that than to hear about real-life failure cases. A good bug report will include: -1. A minimal, reproducible example - a small, self-contained script that can reproduce the behavior is the best way to get your bug fixed. For more information and tips on how to structure these, read [StackOverflow's guide to creating a minimal, complete, verified example](https://stackoverflow.com/help/mcve). +1. A minimal, reproducible example - a small, self-contained script that can reproduce the behavior is the best way to get your bug fixed. For more information and tips on how to structure these, read [Stack Overflow's guide to creating a minimal, complete, verified example](https://stackoverflow.com/help/mcve). 2. The platform and versions of everything involved, at a minimum please include operating system, `python` version and `dateutil` version. Instructions on getting your versions: - `dateutil`: `python -c 'import dateutil; print(dateutil.__version__)'` @@ -51,7 +51,7 @@ an invalid value for tzstr. Reported by @pganssle (gh issue #259). Fixed by @pablogsal (gh pr #581) ``` -For bugs reported and fixed by the same person use "Reported and fixed by @{patch submitter}". It is not necessary to create a github issue just for the purpose of mentioning it in the changelog, if the PR *is* the report, mentioning the PR is enough. +For bugs reported and fixed by the same person use "Reported and fixed by @{patch submitter}". It is not necessary to create a GitHub issue just for the purpose of mentioning it in the changelog, if the PR *is* the report, mentioning the PR is enough. ## License @@ -41,7 +41,7 @@ Bugfixes Reported by @cjgibson (gh issue #820). Fixed by @Cheukting (gh pr #822) - Fixed a bug with base offset changes during DST in ``tzfile``, and refactored the way base offset changes are detected. Originally reported on - StackOverflow by @MartinThoma. (gh issue #812, gh pr #810) + Stack Overflow by @MartinThoma. (gh issue #812, gh pr #810) - Fixed error condition in ``tz.gettz`` when a non-ASCII timezone is passed on Windows in Python 2.7. (gh issue #802, pr #861) - Improved performance and inspection properties of ``tzname`` methods. @@ -123,7 +123,7 @@ Bugfixes - Fixed issue in ``parser`` where a ``tzinfos`` call explicitly returning ``None`` would throw a ``ValueError``. Fixed by @parsethis (gh issue #661, gh pr #681) -- Fixed incorrect parsing of certain dates earlier than 100 AD when repesented +- Fixed incorrect parsing of certain dates earlier than 100 AD when represented in the form "%B.%Y.%d", e.g. "December.0031.30". (gh issue #687, pr #700) - Added time zone inference when initializing an ``rrule`` with a specified ``UNTIL`` but without an explicitly specified ``DTSTART``; the time zone @@ -253,7 +253,7 @@ Version 2.7.0 and fixed by @jbrockmendel (gh pr #589) - Significantly refactored parser code by @jbrockmendel (gh prs #419, #436, #490, #498, #539) and @pganssle (gh prs #435, #468) -- Implementated of __hash__ for relativedelta and weekday, reported and fixed +- Implemented of __hash__ for relativedelta and weekday, reported and fixed by @mrigor (gh pr #389) - Implemented __abs__ for relativedelta. Reported by @binnisb and @pferreir (gh issue #350, pr #472) @@ -339,7 +339,7 @@ Version 2.7.0 - Fixed dangling parenthesis in tzoffset documentation (gh pr #461) - Started including the license file in wheels. Reported and fixed by @jdufresne (gh pr #476) -- Indendation fixes to parser docstring by @jbrockmendel (gh pr #492) +- Indentation fixes to parser docstring by @jbrockmendel (gh pr #492) - Moved many examples from the "examples" documentation into their appropriate module documentation pages. Fixed by @Tomasz-Kluczkowski and @jakec-github (gh pr #558, #561) @@ -493,7 +493,7 @@ Version 2.5.0 - zoneinfo_metadata file version increased to 2.0 - the updated updatezinfo.py script will work with older zoneinfo_metadata.json files, but new metadata files will not work with older updatezinfo.py versions. Additionally, we have - started hosting our own mirror of the Olson databases on a github pages + started hosting our own mirror of the Olson databases on a GitHub pages site (https://dateutil.github.io/tzdata/) (gh pr #183) - dateutil zoneinfo tarballs now contain the full zoneinfo_metadata file used to generate them. (gh issue #27, gh pr #85) @@ -63,14 +63,14 @@ https://dateutil.readthedocs.io/en/stable/ Code ==== -The code and issue tracker are hosted on Github: +The code and issue tracker are hosted on GitHub: https://github.com/dateutil/dateutil/ Features ======== * Computing of relative deltas (next month, next year, - next monday, last week of month, etc); + next Monday, last week of month, etc); * Computing of relative deltas between two given date and/or datetime objects; * Computing of dates based on very flexible recurrence rules, diff --git a/changelog.d/952.misc.rst b/changelog.d/952.misc.rst new file mode 100644 index 0000000..baa2671 --- /dev/null +++ b/changelog.d/952.misc.rst @@ -0,0 +1 @@ +Fixed many misspellings, typos and styling errors in the comments and documentation. Patch by Hugo van Kemenade (gh pr #952) diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py index e3e269c..458aa6a 100644 --- a/dateutil/parser/_parser.py +++ b/dateutil/parser/_parser.py @@ -423,7 +423,7 @@ class _ymd(list): elif not self.has_month: return 1 <= value <= 31 elif not self.has_year: - # Be permissive, assume leapyear + # Be permissive, assume leap year month = self[self.mstridx] return 1 <= value <= monthrange(2000, month)[1] else: @@ -539,7 +539,7 @@ class _ymd(list): year, month, day = self else: # 01-Jan-01 - # Give precendence to day-first, since + # Give precedence to day-first, since # two-digit years is usually hand-written. day, month, year = self @@ -1025,7 +1025,7 @@ class parser(object): hms_idx = idx + 2 elif idx > 0 and info.hms(tokens[idx-1]) is not None: - # There is a "h", "m", or "s" preceeding this token. Since neither + # There is a "h", "m", or "s" preceding this token. Since neither # of the previous cases was hit, there is no label following this # token, so we use the previous label. # e.g. the "04" in "12h04" @@ -1105,7 +1105,7 @@ class parser(object): def _parse_min_sec(self, value): # TODO: Every usage of this function sets res.second to the return # value. Are there any cases where second will be returned as None and - # we *dont* want to set res.second = None? + # we *don't* want to set res.second = None? minute = int(value) second = None diff --git a/dateutil/relativedelta.py b/dateutil/relativedelta.py index c65c66e..a9e85f7 100644 --- a/dateutil/relativedelta.py +++ b/dateutil/relativedelta.py @@ -45,7 +45,7 @@ class relativedelta(object): years, months, weeks, days, hours, minutes, seconds, microseconds: Relative information, may be negative (argument is plural); adding or subtracting a relativedelta with relative information performs - the corresponding aritmetic operation on the original datetime value + the corresponding arithmetic operation on the original datetime value with the information in the relativedelta. weekday: diff --git a/dateutil/rrule.py b/dateutil/rrule.py index 4ce401d..6bf0ea9 100644 --- a/dateutil/rrule.py +++ b/dateutil/rrule.py @@ -177,7 +177,7 @@ class rrulebase(object): return False return False - # __len__() introduces a large performance penality. + # __len__() introduces a large performance penalty. def count(self): """ Returns the number of recurrences in this set. It will have go trough the whole recurrence, if this hasn't been done before. """ diff --git a/dateutil/test/test_internals.py b/dateutil/test/test_internals.py index a64c514..dbe968b 100644 --- a/dateutil/test/test_internals.py +++ b/dateutil/test/test_internals.py @@ -31,7 +31,7 @@ class TestYMD(unittest.TestCase): assert not ymd.could_be_day(-6) assert not ymd.could_be_day(32) - # Assumes leapyear + # Assumes leap year assert ymd.could_be_day(29) ymd.append(1999) diff --git a/dateutil/test/test_parser.py b/dateutil/test/test_parser.py index 6cdc27f..a80b561 100644 --- a/dateutil/test/test_parser.py +++ b/dateutil/test/test_parser.py @@ -837,7 +837,7 @@ class TestParseUnimplementedCases(object): def test_extraneous_year_tokens(self): # This was found in the wild at insidertrading.org # Unlike in the case above, identifying the first "2012" as the year - # would not be a problem, but infering that the latter 2012 is hhmm + # would not be a problem, but inferring that the latter 2012 is hhmm # is a problem. dstr = "2012 MARTIN CHILDREN'S IRREVOCABLE TRUST u/a/d NOVEMBER 7, 2012" expected = datetime(2012, 11, 7) diff --git a/dateutil/test/test_relativedelta.py b/dateutil/test/test_relativedelta.py index 89cc808..301dc6b 100644 --- a/dateutil/test/test_relativedelta.py +++ b/dateutil/test/test_relativedelta.py @@ -474,7 +474,7 @@ class RelativeDeltaTest(WarningTestMixin, unittest.TestCase): self.assertEqual(rd1.normalized(), relativedelta(days=2, hours=18)) - # Equvalent to (days=1, hours=11, minutes=31, seconds=12) + # Equivalent to (days=1, hours=11, minutes=31, seconds=12) rd2 = relativedelta(days=1.48) self.assertEqual(rd2.normalized(), diff --git a/dateutil/test/test_tz.py b/dateutil/test/test_tz.py index 1d60c99..aac4f4b 100644 --- a/dateutil/test/test_tz.py +++ b/dateutil/test/test_tz.py @@ -2239,7 +2239,7 @@ class TzWinLocalTest(unittest.TestCase, TzWinFoldMixin): def testLocal(self): # Not sure how to pin a local time zone, so for now we're just going # to run this and make sure it doesn't raise an error - # See Github Issue #135: https://github.com/dateutil/dateutil/issues/135 + # See GitHub Issue #135: https://github.com/dateutil/dateutil/issues/135 datetime.now(tzwin.tzwinlocal()) def testTzwinLocalUTCOffset(self): diff --git a/dateutil/tz/_common.py b/dateutil/tz/_common.py index 594e082..e6ac118 100644 --- a/dateutil/tz/_common.py +++ b/dateutil/tz/_common.py @@ -212,7 +212,7 @@ class _tzinfo(tzinfo): Since this is the one time that we *know* we have an unambiguous datetime object, we take this opportunity to determine whether the datetime is ambiguous and in a "fold" state (e.g. if it's the first - occurence, chronologically, of the ambiguous datetime). + occurrence, chronologically, of the ambiguous datetime). :param dt: A timezone-aware :class:`datetime.datetime` object. @@ -250,7 +250,7 @@ class _tzinfo(tzinfo): Since this is the one time that we *know* we have an unambiguous datetime object, we take this opportunity to determine whether the datetime is ambiguous and in a "fold" state (e.g. if it's the first - occurance, chronologically, of the ambiguous datetime). + occurrence, chronologically, of the ambiguous datetime). :param dt: A timezone-aware :class:`datetime.datetime` object. diff --git a/dateutil/tz/tz.py b/dateutil/tz/tz.py index 2579213..9d64c37 100644 --- a/dateutil/tz/tz.py +++ b/dateutil/tz/tz.py @@ -385,7 +385,7 @@ class _tzfile(object): class tzfile(_tzinfo): """ - This is a ``tzinfo`` subclass thant allows one to use the ``tzfile(5)`` + This is a ``tzinfo`` subclass that allows one to use the ``tzfile(5)`` format timezone files to extract current and historical zone information. :param fileobj: diff --git a/dateutil/utils.py b/dateutil/utils.py index ebcce6a..44d9c99 100644 --- a/dateutil/utils.py +++ b/dateutil/utils.py @@ -28,7 +28,7 @@ def today(tzinfo=None): def default_tzinfo(dt, tzinfo): """ - Sets the the ``tzinfo`` parameter on naive datetimes only + Sets the ``tzinfo`` parameter on naive datetimes only This is useful for example when you are provided a datetime that may have either an implicit or explicit time zone, such as when parsing a time zone diff --git a/docs/examples.rst b/docs/examples.rst index fccbce5..90bb2c2 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -511,7 +511,7 @@ Every 18 months on the 10th thru 15th of the month for 10 occurrences. datetime.datetime(1999, 3, 13, 9, 0)] -Every Tuesday, every other month, 6 occurences. +Every Tuesday, every other month, 6 occurrences. .. doctest:: rrule :options: +NORMALIZE_WHITESPACE diff --git a/docs/rrule.rst b/docs/rrule.rst index 3fe569e..66b3cfc 100644 --- a/docs/rrule.rst +++ b/docs/rrule.rst @@ -320,7 +320,7 @@ Every 18 months on the 10th thru 15th of the month for 10 occurrences. datetime.datetime(1999, 3, 13, 9, 0)] -Every Tuesday, every other month, 6 occurences. +Every Tuesday, every other month, 6 occurrences. .. doctest:: rrule :options: +NORMALIZE_WHITESPACE |
