Make a copy of current settings and convert to a dict. This method returns a new dict populated with the same values and their priorities as the current settings. Modifications to the returned dict won't be reflected on the original settings. This
(self)
| 669 | ) |
| 670 | |
| 671 | def copy_to_dict(self) -> dict[_SettingsKey, Any]: |
| 672 | """ |
| 673 | Make a copy of current settings and convert to a dict. |
| 674 | |
| 675 | This method returns a new dict populated with the same values |
| 676 | and their priorities as the current settings. |
| 677 | |
| 678 | Modifications to the returned dict won't be reflected on the original |
| 679 | settings. |
| 680 | |
| 681 | This method can be useful for example for printing settings |
| 682 | in Scrapy shell. |
| 683 | """ |
| 684 | settings = self.copy() |
| 685 | return settings._to_dict() |
| 686 | |
| 687 | # https://ipython.readthedocs.io/en/stable/config/integrating.html#pretty-printing |
| 688 | def _repr_pretty_(self, p: Any, cycle: bool) -> None: |