How to use the proselint.checks.dates_times.dates function in proselint

To help you get started, we’ve selected a few proselint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amperser / proselint / tests / test_garner_dates.py View on Github external
def test_50_Cent_hyphenation(self):
        """Don't flag 50's when it refers to 50 Cent's manager."""
        text = """
            Dr. Dre suggested to 50's manager that he look into signing
            Eminem to the G-Unit record label.
        """
        errors = dates.check_decade_apostrophes_short(text)
        assert len(errors) == 0
github amperser / proselint / tests / test_garner_dates.py View on Github external
def test_50s_hyphenation(self):
        """Find unneeded hyphen in 50's."""
        text = """The 50's were swell."""
        errors = dates.check_decade_apostrophes_short(text)
        assert len(errors) == 1
github amperser / proselint / tests / test_dates_times_dates.py View on Github external
def this_check(self):
        """Boilerplate."""
        return chk