Как настроить black в PyCharm
- Поставить плагин File Watchers: https://plugins.jetbrains.com/plugin/7177-file-watchers
- Перейти в Настройки (Ctrl+Shift+P или ⌘+,)
- Найти в поиске File Watchers
- Нажать на Import https://imgur.com/TazWigc
- Нажать OK
| use pyo3::prelude::*; | |
| use pyo3::type_object::PyBorrowFlagLayout; | |
| use pyo3::{PyClass, PyTypeInfo}; | |
| use serde::{de, ser, Deserialize, Deserializer, Serialize, Serializer}; | |
| pub fn serialize<S, T>(value: &Py<T>, serializer: S) -> Result<S::Ok, S::Error> | |
| where | |
| S: Serializer, | |
| T: Serialize + PyClass, | |
| { |
Как настроить black в PyCharm
| """ | |
| Convert a dict-like config to a list of environment variables, discarding values | |
| >>> config_to_envs(dict( | |
| ... server=dict(port=8000), | |
| ... database=dict(dsn='postgres://postgres:password@host:5432/postgres'), | |
| ... debug=True)) | |
| ['SERVER_PORT', 'DATABASE_DSN', 'DEBUG'] | |
| >>> config_to_envs(dict( |