Skip to content

Commit

Permalink
Don't import Optional from typing, import the whole module. (#386)
Browse files Browse the repository at this point in the history
Addresses mypy confusion of pyparsing Optional and typing.Optional
  • Loading branch information
domdfcoding committed Apr 11, 2022
1 parent 4e627f2 commit e401cf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyparsing/exceptions.py
Expand Up @@ -2,7 +2,7 @@

import re
import sys
from typing import Optional
import typing

from .util import col, line, lineno, _collapse_string_to_ranges
from .unicode import pyparsing_unicode as ppu
Expand All @@ -25,7 +25,7 @@ def __init__(
self,
pstr: str,
loc: int = 0,
msg: Optional[str] = None,
msg: typing.Optional[str] = None,
elem=None,
):
self.loc = loc
Expand Down

0 comments on commit e401cf8

Please sign in to comment.