We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix mypy issues
There are several things to consider:

1. Fixing bugs like this one: https://travis-ci.org/lk-geimfari/mimesis/jobs/361128185#L600
2. Adding new options to `mypy` to make it stricter: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7Bcookiecutter.project_name%7D%7D/setup.cfg#L67
3. Add `tests` folder to be checked by `mypy` (not only `mimesis/` folder is checked)

I can do it, if @lk-geimfari does not have anything to add/comment.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mimesis/providers/payment.py`
Content:
```
1 """Provides data related to payment."""
2 
3 import re
4 import string
5 from typing import Optional
6 
7 from mimesis.data import CREDIT_CARD_NETWORKS
8 from mimesis.enums import CardType, Gender
9 from mimesis.exceptions import NonEnumerableError
10 from mimesis.helpers import get_random_item
11 from mimesis.providers.base import BaseDataProvider
12 from mimesis.providers.person import Person
13 from mimesis.utils import luhn_checksum
14 
15 __all__ = ['Payment']
16 
17 
18 class Payment(BaseDataProvider):
19     """Class that provides data related to payments."""
20 
21     def __init__(self, *args, **kwargs) -> None:
22         """Initialize attributes.
23 
24         :param args: Arguments.
25         :param kwargs: Keyword arguments.
26         """
27         super().__init__(*args, **kwargs)
28         self.__person = Person('en', seed=self.seed)
29 
30     def cid(self) -> int:
31         """Generate a random CID.
32 
33         :return: CID code.
34 
35         :Example:
36             7452
37         """
38         return self.random.randint(1000, 9999)
39 
40     def paypal(self) -> str:
41         """Generate a random PayPal account.
42 
43         :return: Email of PapPal user.
44 
45         :Example:
46             wolf235@gmail.com
47         """
48         return self.__person.email()
49 
50     def bitcoin_address(self) -> str:
51         """Generate a random bitcoin address.
52 
53         :return: Bitcoin address.
54 
55         :Example:
56             3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX
57         """
58         type_ = self.random.choice(['1', '3'])
59         letters = string.ascii_letters + string.digits
60         return type_ + ''.join(
61             self.random.choice(letters) for _ in range(33))
62 
63     def ethereum_address(self) -> str:
64         """Generate a random Ethereum address.
65 
66         .. Note: The address will look like Ethereum address,
67         but keep in mind that it is not the valid address.
68 
69         :return: Ethereum address.
70 
71         :Example:
72             0xe8ece9e6ff7dba52d4c07d37418036a89af9698d
73         """
74         bits = self.random.getrandbits(160)
75         address = bits.to_bytes(20, byteorder='big')
76         return '0x' + address.hex()
77 
78     def credit_card_network(self) -> str:
79         """Generate a random credit card network.
80 
81         :return: Credit card network
82 
83         :Example:
84             MasterCard
85         """
86         return self.random.choice(CREDIT_CARD_NETWORKS)
87 
88     def credit_card_number(self, card_type: Optional[CardType] = None) -> str:
89         """Generate a random credit card number.
90 
91         :param card_type: Issuing Network. Default is Visa.
92         :return: Credit card number.
93         :raises NotImplementedError: if cart_type is not supported.
94 
95         :Example:
96             4455 5299 1152 2450
97         """
98         length = 16
99         regex = re.compile('(\d{4})(\d{4})(\d{4})(\d{4})')
100 
101         if card_type is None:
102             card_type = get_random_item(CardType, rnd=self.random)
103 
104         if card_type == CardType.VISA:
105             number = self.random.randint(4000, 4999)
106         elif card_type == CardType.MASTER_CARD:
107             number = self.random.choice([
108                 self.random.randint(2221, 2720),
109                 self.random.randint(5100, 5500),
110             ])
111         elif card_type == CardType.AMERICAN_EXPRESS:
112             number = self.random.choice([34, 37])
113             length = 15
114             regex = re.compile('(\d{4})(\d{6})(\d{5})')
115         else:
116             raise NonEnumerableError(CardType)
117 
118         str_num = str(number)
119         while len(str_num) < length - 1:
120             str_num += self.random.choice(string.digits)
121 
122         groups = regex.search(str_num + luhn_checksum(str_num)).groups()
123         card = ' '.join(groups)
124         return card
125 
126     def credit_card_expiration_date(self, minimum: int = 16,
127                                     maximum: int = 25) -> str:
128         """Generate a random expiration date for credit card.
129 
130         :param minimum: Date of issue.
131         :param maximum: Maximum of expiration_date.
132         :return: Expiration date of credit card.
133 
134         :Example:
135             03/19.
136         """
137         month = self.random.randint(1, 12)
138         year = self.random.randint(minimum, maximum)
139         return '{0:02d}/{1}'.format(month, year)
140 
141     def cvv(self) -> int:
142         """Generate a random CVV.
143 
144         :return: CVV code.
145 
146         :Example:
147             324
148         """
149         return self.random.randint(100, 999)
150 
151     def credit_card_owner(self, gender: Optional[Gender] = None) -> dict:
152         """Generate credit card owner.
153 
154         :param gender: Gender of credit card owner.
155         :type gender: Gender's enum object.
156         :return:
157         """
158         owner = {
159             'credit_card': self.credit_card_number(),
160             'expiration_date': self.credit_card_expiration_date(),
161             'owner': self.__person.full_name(gender=gender).upper(),
162         }
163         return owner
164
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mimesis/providers/payment.py b/mimesis/providers/payment.py
--- a/mimesis/providers/payment.py
+++ b/mimesis/providers/payment.py
@@ -119,7 +119,9 @@
         while len(str_num) < length - 1:
             str_num += self.random.choice(string.digits)
 
-        groups = regex.search(str_num + luhn_checksum(str_num)).groups()
+        groups = regex.search(  # type: ignore
+            str_num + luhn_checksum(str_num),
+        ).groups()
         card = ' '.join(groups)
         return card

{"golden_diff": "diff --git a/mimesis/providers/payment.py b/mimesis/providers/payment.py\n--- a/mimesis/providers/payment.py\n+++ b/mimesis/providers/payment.py\n@@ -119,7 +119,9 @@\n         while len(str_num) < length - 1:\n             str_num += self.random.choice(string.digits)\n \n-        groups = regex.search(str_num + luhn_checksum(str_num)).groups()\n+        groups = regex.search(  # type: ignore\n+            str_num + luhn_checksum(str_num),\n+        ).groups()\n         card = ' '.join(groups)\n         return card\n", "issue": "Fix mypy issues\nThere are several things to consider:\r\n\r\n1. Fixing bugs like this one: https://travis-ci.org/lk-geimfari/mimesis/jobs/361128185#L600\r\n2. Adding new options to `mypy` to make it stricter: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7Bcookiecutter.project_name%7D%7D/setup.cfg#L67\r\n3. Add `tests` folder to be checked by `mypy` (not only `mimesis/` folder is checked)\r\n\r\nI can do it, if @lk-geimfari does not have anything to add/comment.\n", "before_files": [{"content": "\"\"\"Provides data related to payment.\"\"\"\n\nimport re\nimport string\nfrom typing import Optional\n\nfrom mimesis.data import CREDIT_CARD_NETWORKS\nfrom mimesis.enums import CardType, Gender\nfrom mimesis.exceptions import NonEnumerableError\nfrom mimesis.helpers import get_random_item\nfrom mimesis.providers.base import BaseDataProvider\nfrom mimesis.providers.person import Person\nfrom mimesis.utils import luhn_checksum\n\n__all__ = ['Payment']\n\n\nclass Payment(BaseDataProvider):\n    \"\"\"Class that provides data related to payments.\"\"\"\n\n    def __init__(self, *args, **kwargs) -> None:\n        \"\"\"Initialize attributes.\n\n        :param args: Arguments.\n        :param kwargs: Keyword arguments.\n        \"\"\"\n        super().__init__(*args, **kwargs)\n        self.__person = Person('en', seed=self.seed)\n\n    def cid(self) -> int:\n        \"\"\"Generate a random CID.\n\n        :return: CID code.\n\n        :Example:\n            7452\n        \"\"\"\n        return self.random.randint(1000, 9999)\n\n    def paypal(self) -> str:\n        \"\"\"Generate a random PayPal account.\n\n        :return: Email of PapPal user.\n\n        :Example:\n            wolf235@gmail.com\n        \"\"\"\n        return self.__person.email()\n\n    def bitcoin_address(self) -> str:\n        \"\"\"Generate a random bitcoin address.\n\n        :return: Bitcoin address.\n\n        :Example:\n            3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX\n        \"\"\"\n        type_ = self.random.choice(['1', '3'])\n        letters = string.ascii_letters + string.digits\n        return type_ + ''.join(\n            self.random.choice(letters) for _ in range(33))\n\n    def ethereum_address(self) -> str:\n        \"\"\"Generate a random Ethereum address.\n\n        .. Note: The address will look like Ethereum address,\n        but keep in mind that it is not the valid address.\n\n        :return: Ethereum address.\n\n        :Example:\n            0xe8ece9e6ff7dba52d4c07d37418036a89af9698d\n        \"\"\"\n        bits = self.random.getrandbits(160)\n        address = bits.to_bytes(20, byteorder='big')\n        return '0x' + address.hex()\n\n    def credit_card_network(self) -> str:\n        \"\"\"Generate a random credit card network.\n\n        :return: Credit card network\n\n        :Example:\n            MasterCard\n        \"\"\"\n        return self.random.choice(CREDIT_CARD_NETWORKS)\n\n    def credit_card_number(self, card_type: Optional[CardType] = None) -> str:\n        \"\"\"Generate a random credit card number.\n\n        :param card_type: Issuing Network. Default is Visa.\n        :return: Credit card number.\n        :raises NotImplementedError: if cart_type is not supported.\n\n        :Example:\n            4455 5299 1152 2450\n        \"\"\"\n        length = 16\n        regex = re.compile('(\\d{4})(\\d{4})(\\d{4})(\\d{4})')\n\n        if card_type is None:\n            card_type = get_random_item(CardType, rnd=self.random)\n\n        if card_type == CardType.VISA:\n            number = self.random.randint(4000, 4999)\n        elif card_type == CardType.MASTER_CARD:\n            number = self.random.choice([\n                self.random.randint(2221, 2720),\n                self.random.randint(5100, 5500),\n            ])\n        elif card_type == CardType.AMERICAN_EXPRESS:\n            number = self.random.choice([34, 37])\n            length = 15\n            regex = re.compile('(\\d{4})(\\d{6})(\\d{5})')\n        else:\n            raise NonEnumerableError(CardType)\n\n        str_num = str(number)\n        while len(str_num) < length - 1:\n            str_num += self.random.choice(string.digits)\n\n        groups = regex.search(str_num + luhn_checksum(str_num)).groups()\n        card = ' '.join(groups)\n        return card\n\n    def credit_card_expiration_date(self, minimum: int = 16,\n                                    maximum: int = 25) -> str:\n        \"\"\"Generate a random expiration date for credit card.\n\n        :param minimum: Date of issue.\n        :param maximum: Maximum of expiration_date.\n        :return: Expiration date of credit card.\n\n        :Example:\n            03/19.\n        \"\"\"\n        month = self.random.randint(1, 12)\n        year = self.random.randint(minimum, maximum)\n        return '{0:02d}/{1}'.format(month, year)\n\n    def cvv(self) -> int:\n        \"\"\"Generate a random CVV.\n\n        :return: CVV code.\n\n        :Example:\n            324\n        \"\"\"\n        return self.random.randint(100, 999)\n\n    def credit_card_owner(self, gender: Optional[Gender] = None) -> dict:\n        \"\"\"Generate credit card owner.\n\n        :param gender: Gender of credit card owner.\n        :type gender: Gender's enum object.\n        :return:\n        \"\"\"\n        owner = {\n            'credit_card': self.credit_card_number(),\n            'expiration_date': self.credit_card_expiration_date(),\n            'owner': self.__person.full_name(gender=gender).upper(),\n        }\n        return owner\n", "path": "mimesis/providers/payment.py"}], "after_files": [{"content": "\"\"\"Provides data related to payment.\"\"\"\n\nimport re\nimport string\nfrom typing import Optional\n\nfrom mimesis.data import CREDIT_CARD_NETWORKS\nfrom mimesis.enums import CardType, Gender\nfrom mimesis.exceptions import NonEnumerableError\nfrom mimesis.helpers import get_random_item\nfrom mimesis.providers.base import BaseDataProvider\nfrom mimesis.providers.person import Person\nfrom mimesis.utils import luhn_checksum\n\n__all__ = ['Payment']\n\n\nclass Payment(BaseDataProvider):\n    \"\"\"Class that provides data related to payments.\"\"\"\n\n    def __init__(self, *args, **kwargs) -> None:\n        \"\"\"Initialize attributes.\n\n        :param args: Arguments.\n        :param kwargs: Keyword arguments.\n        \"\"\"\n        super().__init__(*args, **kwargs)\n        self.__person = Person('en', seed=self.seed)\n\n    def cid(self) -> int:\n        \"\"\"Generate a random CID.\n\n        :return: CID code.\n\n        :Example:\n            7452\n        \"\"\"\n        return self.random.randint(1000, 9999)\n\n    def paypal(self) -> str:\n        \"\"\"Generate a random PayPal account.\n\n        :return: Email of PapPal user.\n\n        :Example:\n            wolf235@gmail.com\n        \"\"\"\n        return self.__person.email()\n\n    def bitcoin_address(self) -> str:\n        \"\"\"Generate a random bitcoin address.\n\n        :return: Bitcoin address.\n\n        :Example:\n            3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX\n        \"\"\"\n        type_ = self.random.choice(['1', '3'])\n        letters = string.ascii_letters + string.digits\n        return type_ + ''.join(\n            self.random.choice(letters) for _ in range(33))\n\n    def ethereum_address(self) -> str:\n        \"\"\"Generate a random Ethereum address.\n\n        .. Note: The address will look like Ethereum address,\n        but keep in mind that it is not the valid address.\n\n        :return: Ethereum address.\n\n        :Example:\n            0xe8ece9e6ff7dba52d4c07d37418036a89af9698d\n        \"\"\"\n        bits = self.random.getrandbits(160)\n        address = bits.to_bytes(20, byteorder='big')\n        return '0x' + address.hex()\n\n    def credit_card_network(self) -> str:\n        \"\"\"Generate a random credit card network.\n\n        :return: Credit card network\n\n        :Example:\n            MasterCard\n        \"\"\"\n        return self.random.choice(CREDIT_CARD_NETWORKS)\n\n    def credit_card_number(self, card_type: Optional[CardType] = None) -> str:\n        \"\"\"Generate a random credit card number.\n\n        :param card_type: Issuing Network. Default is Visa.\n        :return: Credit card number.\n        :raises NotImplementedError: if cart_type is not supported.\n\n        :Example:\n            4455 5299 1152 2450\n        \"\"\"\n        length = 16\n        regex = re.compile('(\\d{4})(\\d{4})(\\d{4})(\\d{4})')\n\n        if card_type is None:\n            card_type = get_random_item(CardType, rnd=self.random)\n\n        if card_type == CardType.VISA:\n            number = self.random.randint(4000, 4999)\n        elif card_type == CardType.MASTER_CARD:\n            number = self.random.choice([\n                self.random.randint(2221, 2720),\n                self.random.randint(5100, 5500),\n            ])\n        elif card_type == CardType.AMERICAN_EXPRESS:\n            number = self.random.choice([34, 37])\n            length = 15\n            regex = re.compile('(\\d{4})(\\d{6})(\\d{5})')\n        else:\n            raise NonEnumerableError(CardType)\n\n        str_num = str(number)\n        while len(str_num) < length - 1:\n            str_num += self.random.choice(string.digits)\n\n        groups = regex.search(  # type: ignore\n            str_num + luhn_checksum(str_num),\n        ).groups()\n        card = ' '.join(groups)\n        return card\n\n    def credit_card_expiration_date(self, minimum: int = 16,\n                                    maximum: int = 25) -> str:\n        \"\"\"Generate a random expiration date for credit card.\n\n        :param minimum: Date of issue.\n        :param maximum: Maximum of expiration_date.\n        :return: Expiration date of credit card.\n\n        :Example:\n            03/19.\n        \"\"\"\n        month = self.random.randint(1, 12)\n        year = self.random.randint(minimum, maximum)\n        return '{0:02d}/{1}'.format(month, year)\n\n    def cvv(self) -> int:\n        \"\"\"Generate a random CVV.\n\n        :return: CVV code.\n\n        :Example:\n            324\n        \"\"\"\n        return self.random.randint(100, 999)\n\n    def credit_card_owner(self, gender: Optional[Gender] = None) -> dict:\n        \"\"\"Generate credit card owner.\n\n        :param gender: Gender of credit card owner.\n        :type gender: Gender's enum object.\n        :return:\n        \"\"\"\n        owner = {\n            'credit_card': self.credit_card_number(),\n            'expiration_date': self.credit_card_expiration_date(),\n            'owner': self.__person.full_name(gender=gender).upper(),\n        }\n        return owner\n", "path": "mimesis/providers/payment.py"}]}