prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Mypy finds errors in the first example from the documentation
  <details>
  <summary>This example</summary>
  
  
  ```python
  from datetime import datetime
  from typing import List
  from pydantic import BaseModel
  
  class User(BaseModel):
      id: int
      name = 'John Doe'
      signup_ts: datetime = None
      friends: List[int] = []
  
  external_data = {
      'id': '123',
      'signup_ts': '2019-06-01 12:22',
      'friends': [1, 2, '3']
  }
  user = User(**external_data)
  print(user.id)
  print(repr(user.signup_ts))
  print(user.friends)
  print(user.dict())
  ```
  
  </details>
  
  ```
  $ mypy --strict pydantic_example.py 
  pydantic_example.py:3: error: Module 'pydantic' has no attribute 'BaseModel'
  pydantic_example.py:5: error: Class cannot subclass 'BaseModel' (has type 'Any')
  pydantic_example.py:8: error: Incompatible types in assignment (expression has type "None", variable has type "datetime")
  ```
  
  This is not false positive. Pydantic `__init__.py` uses implicit reexport (this is an error, and I don't want to ignore it using `--no-implicit-reexport`), and this example uses None for a non-optional field (this is also an error).
  
  In general, I can't trust a library that suggests putting None in a non-optional field in the very first example. This violates the mypy type system.
  
  </issue>
  <code>
  [start of pydantic/__init__.py]
  1 # flake8: noqa
  2 from . import dataclasses
  3 from .class_validators import root_validator, validator
  4 from .env_settings import BaseSettings
  5 from .error_wrappers import ValidationError
  6 from .errors import *
  7 from .fields import Field, Required, Schema
  8 from .main import *
  9 from .networks import *
  10 from .parse import Protocol
  11 from .tools import *
  12 from .types import *
  13 from .version import VERSION
  14
  [end of pydantic/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/pydantic/__init__.py b/pydantic/__init__.py
  --- a/pydantic/__init__.py
  +++ b/pydantic/__init__.py
  @@ -11,3 +11,85 @@
   from .tools import *
   from .types import *
   from .version import VERSION
  +
  +# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2
  +# please use "from pydantic.errors import ..." instead
  +__all__ = [
  +    # dataclasses
  +    'dataclasses',
  +    'root_validator',
  +    'validator',
  +    # env_settings
  +    'BaseSettings',
  +    # error_wrappers
  +    'ValidationError',
  +    # fields
  +    'Field',
  +    'Required',
  +    'Schema',
  +    # main
  +    'BaseConfig',
  +    'BaseModel',
  +    'Extra',
  +    'compiled',
  +    'create_model',
  +    'validate_model',
  +    # network
  +    'AnyUrl',
  +    'AnyHttpUrl',
  +    'HttpUrl',
  +    'stricturl',
  +    'EmailStr',
  +    'NameEmail',
  +    'IPvAnyAddress',
  +    'IPvAnyInterface',
  +    'IPvAnyNetwork',
  +    'PostgresDsn',
  +    'RedisDsn',
  +    'validate_email',
  +    # parse
  +    'Protocol',
  +    # tools
  +    'parse_file_as',
  +    'parse_obj_as',
  +    # types
  +    'NoneStr',
  +    'NoneBytes',
  +    'StrBytes',
  +    'NoneStrBytes',
  +    'StrictStr',
  +    'ConstrainedBytes',
  +    'conbytes',
  +    'ConstrainedList',
  +    'conlist',
  +    'ConstrainedStr',
  +    'constr',
  +    'PyObject',
  +    'ConstrainedInt',
  +    'conint',
  +    'PositiveInt',
  +    'NegativeInt',
  +    'ConstrainedFloat',
  +    'confloat',
  +    'PositiveFloat',
  +    'NegativeFloat',
  +    'ConstrainedDecimal',
  +    'condecimal',
  +    'UUID1',
  +    'UUID3',
  +    'UUID4',
  +    'UUID5',
  +    'FilePath',
  +    'DirectoryPath',
  +    'Json',
  +    'JsonWrapper',
  +    'SecretStr',
  +    'SecretBytes',
  +    'StrictBool',
  +    'StrictInt',
  +    'StrictFloat',
  +    'PaymentCardNumber',
  +    'ByteSize',
  +    # version
  +    'VERSION',
  +]
  
verification_info: {"golden_diff": "diff --git a/pydantic/__init__.py b/pydantic/__init__.py\n--- a/pydantic/__init__.py\n+++ b/pydantic/__init__.py\n@@ -11,3 +11,85 @@\n from .tools import *\n from .types import *\n from .version import VERSION\n+\n+# WARNING __all__ from .errors is not included here, it will be removed as an export here in v2\n+# please use \"from pydantic.errors import ...\" instead\n+__all__ = [\n+    # dataclasses\n+    'dataclasses',\n+    'root_validator',\n+    'validator',\n+    # env_settings\n+    'BaseSettings',\n+    # error_wrappers\n+    'ValidationError',\n+    # fields\n+    'Field',\n+    'Required',\n+    'Schema',\n+    # main\n+    'BaseConfig',\n+    'BaseModel',\n+    'Extra',\n+    'compiled',\n+    'create_model',\n+    'validate_model',\n+    # network\n+    'AnyUrl',\n+    'AnyHttpUrl',\n+    'HttpUrl',\n+    'stricturl',\n+    'EmailStr',\n+    'NameEmail',\n+    'IPvAnyAddress',\n+    'IPvAnyInterface',\n+    'IPvAnyNetwork',\n+    'PostgresDsn',\n+    'RedisDsn',\n+    'validate_email',\n+    # parse\n+    'Protocol',\n+    # tools\n+    'parse_file_as',\n+    'parse_obj_as',\n+    # types\n+    'NoneStr',\n+    'NoneBytes',\n+    'StrBytes',\n+    'NoneStrBytes',\n+    'StrictStr',\n+    'ConstrainedBytes',\n+    'conbytes',\n+    'ConstrainedList',\n+    'conlist',\n+    'ConstrainedStr',\n+    'constr',\n+    'PyObject',\n+    'ConstrainedInt',\n+    'conint',\n+    'PositiveInt',\n+    'NegativeInt',\n+    'ConstrainedFloat',\n+    'confloat',\n+    'PositiveFloat',\n+    'NegativeFloat',\n+    'ConstrainedDecimal',\n+    'condecimal',\n+    'UUID1',\n+    'UUID3',\n+    'UUID4',\n+    'UUID5',\n+    'FilePath',\n+    'DirectoryPath',\n+    'Json',\n+    'JsonWrapper',\n+    'SecretStr',\n+    'SecretBytes',\n+    'StrictBool',\n+    'StrictInt',\n+    'StrictFloat',\n+    'PaymentCardNumber',\n+    'ByteSize',\n+    # version\n+    'VERSION',\n+]\n", "issue": "Mypy finds errors in the first example from the documentation\n<details>\r\n<summary>This example</summary>\r\n\r\n\r\n```python\r\nfrom datetime import datetime\r\nfrom typing import List\r\nfrom pydantic import BaseModel\r\n\r\nclass User(BaseModel):\r\n    id: int\r\n    name = 'John Doe'\r\n    signup_ts: datetime = None\r\n    friends: List[int] = []\r\n\r\nexternal_data = {\r\n    'id': '123',\r\n    'signup_ts': '2019-06-01 12:22',\r\n    'friends': [1, 2, '3']\r\n}\r\nuser = User(**external_data)\r\nprint(user.id)\r\nprint(repr(user.signup_ts))\r\nprint(user.friends)\r\nprint(user.dict())\r\n```\r\n\r\n</details>\r\n\r\n```\r\n$ mypy --strict pydantic_example.py \r\npydantic_example.py:3: error: Module 'pydantic' has no attribute 'BaseModel'\r\npydantic_example.py:5: error: Class cannot subclass 'BaseModel' (has type 'Any')\r\npydantic_example.py:8: error: Incompatible types in assignment (expression has type \"None\", variable has type \"datetime\")\r\n```\r\n\r\nThis is not false positive. Pydantic `__init__.py` uses implicit reexport (this is an error, and I don't want to ignore it using `--no-implicit-reexport`), and this example uses None for a non-optional field (this is also an error).\r\n\r\nIn general, I can't trust a library that suggests putting None in a non-optional field in the very first example. This violates the mypy type system.\n", "before_files": [{"content": "# flake8: noqa\nfrom . import dataclasses\nfrom .class_validators import root_validator, validator\nfrom .env_settings import BaseSettings\nfrom .error_wrappers import ValidationError\nfrom .errors import *\nfrom .fields import Field, Required, Schema\nfrom .main import *\nfrom .networks import *\nfrom .parse import Protocol\nfrom .tools import *\nfrom .types import *\nfrom .version import VERSION\n", "path": "pydantic/__init__.py"}]}