Method
_get_increment_base
(
self, increment: Increment | None, exact_increment: bool
)
Source from the content-addressed store, hash-verified
| 273 | ) # type: ignore[return-value] |
| 274 | |
| 275 | def _get_increment_base( |
| 276 | self, increment: Increment | None, exact_increment: bool |
| 277 | ) -> str: |
| 278 | if ( |
| 279 | not self.is_prerelease |
| 280 | or exact_increment |
| 281 | or (increment == MINOR and self.micro != 0) |
| 282 | or (increment == MAJOR and (self.minor != 0 or self.micro != 0)) |
| 283 | ): |
| 284 | return self.increment_base(increment) |
| 285 | return f"{self.major}.{self.minor}.{self.micro}" |
| 286 | |
| 287 | |
| 288 | class Pep440(BaseVersion): |
Tested by
no test coverage detected