Skip to content

Commit b87f8d3

Browse files
committed
Revert documentation for "Create module attributes to set global default values for keyword argument options"
It wasn't working. This partially reverts commit d64b291.
1 parent c250c05 commit b87f8d3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ The `validate_email` function also accepts the following keyword arguments
136136

137137
`allow_smtputf8=True`: Set to `False` to prohibit internationalized addresses that would
138138
require the
139-
[SMTPUTF8](https://tools.ietf.org/html/rfc6531) extension. You can also set `email_validator.ALLOW_SMTPUTF8` to `False` to turn it off for all calls by default.
139+
[SMTPUTF8](https://tools.ietf.org/html/rfc6531) extension.
140140

141-
`check_deliverability=True`: Set to `False` to skip the domain name MX DNS record check. You can also set `email_validator.CHECK_DELIVERABILITY` to `False` to turn it off for all calls by default.
141+
`check_deliverability=True`: Set to `False` to skip the domain name MX DNS record check.
142142

143143
`allow_empty_local=False`: Set to `True` to allow an empty local part (i.e.
144144
`@example.com`), e.g. for validating Postfix aliases.
145145

146146
`dns_resolver=None`: Pass an instance of [dns.resolver.Resolver](https://dnspython.readthedocs.io/en/latest/resolver-class.html) to control the DNS resolver including setting a timeout and [a cache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html). The `caching_resolver` function shown above is a helper function to construct a dns.resolver.Resolver with a [LRUCache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html#dns.resolver.LRUCache). Reuse the same resolver instance across calls to `validate_email` to make use of the cache.
147147

148-
`test_environment=False`: DNS-based deliverability checks are disabled and `test` and `subdomain.test` domain names are permitted (see below). You can also set `email_validator.TEST_ENVIRONMENT` to `True` to turn it on for all calls by default.
148+
`test_environment=False`: DNS-based deliverability checks are disabled and `test` and `subdomain.test` domain names are permitted (see below).
149149

150150
### DNS timeout and cache
151151

@@ -162,11 +162,10 @@ while True:
162162

163163
### Test addresses
164164

165-
This library rejects email addresess that use the [Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml) `invalid`, `localhost`, `test`, and some others by raising `EmailUndeliverableError`. This is to protect your system from abuse: You probably don't want a user to be able to cause an email to be sent to `localhost`. However, in your non-production test environments you may want to use `@test` or `@myname.test` email addresses. There are three ways you can allow this:
165+
This library rejects email addresess that use the [Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml) `invalid`, `localhost`, `test`, and some others by raising `EmailUndeliverableError`. This is to protect your system from abuse: You probably don't want a user to be able to cause an email to be sent to `localhost`. However, in your non-production test environments you may want to use `@test` or `@myname.test` email addresses. There are two ways you can allow this:
166166

167-
1. Add `test_environment=True` to the call to `validate_email` (see above).
168-
2. Set `email_validator.TEST_ENVIRONMENT` to `True`.
169-
3. Remove the special-use domain name that you want to use from `email_validator.SPECIAL_USE_DOMAIN_NAMES`:
167+
A. Add `test_environment=True` to the call to `validate_email` (see above).
168+
B. Remove the special-use domain name that you want to use from `email_validator.SPECIAL_USE_DOMAIN_NAMES`:
170169

171170
```python
172171
import email_validator

0 commit comments

Comments
 (0)