<!-- Thank you for your contribution! -->
<!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR -->

## Change Summary

<!-- Please give a short summary of the changes. -->

Emit a warning when writing:

```python
class Model(Generic[T], BaseModel):
```

instead of:

```python
class Model(BaseModel, Generic[T]):
```

More generally, `BaseModel` must appear in the `__mro__` before `Generic`, so indirect subclasses are also checked. This means that `__class_getitem__` will use `BaseModel` instead of `Generic` and `Model[T]` will return a model class rather than a `_GenericAlias`.

## Related issue number

Closes https://github.com/pydantic/pydantic/issues/7845

Waiting for a reply to https://github.com/pydantic/pydantic/issues/6994#issuecomment-1773295810 before continuing here, but thought I should push what I have so far. The failing tests might be of interest.

## Checklist

* [x] The pull request title is a good summary of the changes - it will be used in the changelog
* [x] Unit tests for the changes exist
* [x] Tests pass on CI
* [x] Documentation reflects the changes where applicable
* [x] My PR is ready to review, **please add a comment including the phrase "please review" to assign reviewers**


Selected Reviewer: @dmontagu
Warn if a class inherits from Generic before BaseModel. <!-- Thank you for your contribution! -->
<!-- Unless your change is trivial, please create an issue to discuss the change before creating a PR -->

## Change Summary

<!-- Please give a short summary of the changes. -->

Emit a warning when writing:

```python
class Model(Generic[T], BaseModel):
```

instead of:

```python
class Model(BaseModel, Generic[T]):
```

More generally, `BaseModel` must appear in the `__mro__` before `Generic`, so indirect subclasses are also checked. This means that `__class_getitem__` will use `BaseModel` instead of `Generic` and `Model[T]` will return a model class rather than a `_GenericAlias`.

## Related issue number

Closes https://github.com/pydantic/pydantic/issues/7845

Waiting for a reply to https://github.com/pydantic/pydantic/issues/6994#issuecomment-1773295810 before continuing here, but thought I should push what I have so far. The failing tests might be of interest.

## Checklist

* [x] The pull request title is a good summary of the changes - it will be used in the changelog
* [x] Unit tests for the changes exist
* [x] Tests pass on CI
* [x] Documentation reflects the changes where applicable
* [x] My PR is ready to review, **please add a comment including the phrase "please review" to assign reviewers**


Selected Reviewer: @dmontagu
from pydantic import BaseModel, Field


class Model(BaseModel):
    # Required
    undefined_default_no_args: int = Field()
    undefined_default: int = Field(description='my desc')
    positional_ellipsis_default: int = Field(...)
    named_ellipsis_default: int = Field(default=...)

    # Not required
    positional_default: int = Field(1)
    named_default: int = Field(default=2)
    named_default_factory: int = Field(default_factory=lambda: 3)


Model()
# MYPY: error: Missing named argument "undefined_default_no_args" for "Model"  [call-arg]
# MYPY: error: Missing named argument "undefined_default" for "Model"  [call-arg]
# MYPY: error: Missing named argument "positional_ellipsis_default" for "Model"  [call-arg]
# MYPY: error: Missing named argument "named_ellipsis_default" for "Model"  [call-arg]

from pydantic import BaseModel, Field


class Model(BaseModel):
    # Required
    undefined_default_no_args: int = Field()
    undefined_default: int = Field(description='my desc')
    positional_ellipsis_default: int = Field(...)
    named_ellipsis_default: int = Field(default=...)

    # Not required
    positional_default: int = Field(1)
    named_default: int = Field(default=2)
    named_default_factory: int = Field(default_factory=lambda: 3)


Model()
# MYPY: error: Missing named argument "undefined_default_no_args" for "Model"  [call-arg]
# MYPY: error: Missing named argument "undefined_default" for "Model"  [call-arg]
# MYPY: error: Missing named argument "positional_ellipsis_default" for "Model"  [call-arg]
# MYPY: error: Missing named argument "named_ellipsis_default" for "Model"  [call-arg]
