pylint
pylint copied to clipboard
Fix a crash when a pylint must display unicode raising a UnicodeEncodeError
Type of Changes
| Type | |
|---|---|
| ✓ | :bug: Bug fix |
Description
Work in progress for #8736, this is probably not the right fix, but it's a fix. Hoping for a surrogates/unicode expert to chime in with the right approach 😄 !
We should probably aim to keep the \ud800\udc00 format instead of transforming to actual utf32 characters.
https://stackoverflow.com/questions/27366479/python-3-os-walk-file-paths-unicodeencodeerror-utf-8-codec-cant-encode-s
encode('utf8','replace') seems to work? Although I really don't like that we need to add special logic for a really uncommon case..
🤖 Effect of this PR on checked open source code: 🤖
Effect on astroid: The following messages are now emitted:
- use-implicit-booleaness-not-comparison-to-string: "parts[0] == ''" can be simplified to "not parts[0]", if it is strictly a string, as an empty string is falsey https://github.com/pylint-dev/astroid/blob/709f991aed8033beb6ea575188c96a6d75fd9c5a/astroid/modutils.py#L417
- use-implicit-booleaness-not-comparison-to-string: "parts[starti] == ''" can be simplified to "not parts[starti]", if it is strictly a string, as an empty string is falsey https://github.com/pylint-dev/astroid/blob/709f991aed8033beb6ea575188c96a6d75fd9c5a/astroid/modutils.py#L424
The following messages are no longer emitted:
- use-implicit-booleaness-not-comparison-to-string: "parts[0] == ''" can be simplified to "not parts[0]", if it is striclty a string, as an empty string is falsey https://github.com/pylint-dev/astroid/blob/709f991aed8033beb6ea575188c96a6d75fd9c5a/astroid/modutils.py#L417
- use-implicit-booleaness-not-comparison-to-string: "parts[starti] == ''" can be simplified to "not parts[starti]", if it is striclty a string, as an empty string is falsey https://github.com/pylint-dev/astroid/blob/709f991aed8033beb6ea575188c96a6d75fd9c5a/astroid/modutils.py#L424
Effect on home-assistant: The following messages are now emitted:
- use-implicit-booleaness-not-comparison-to-string: "text == ''" can be simplified to "not text", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/util/init.py#L43
- use-implicit-booleaness-not-comparison-to-string: "slug == ''" can be simplified to "not slug", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/util/init.py#L46
- use-implicit-booleaness-not-comparison-to-string: "value == ''" can be simplified to "not value", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/config_validation.py#L264
- use-implicit-booleaness-not-comparison-to-string: "suggested_area != ''" can be simplified to "suggested_area", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/device_registry.py#L940
- use-implicit-booleaness-not-comparison-to-string: "self.DOMAIN == ''" can be simplified to "not self.DOMAIN", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/config_entry_oauth2_flow.py#L239
- use-implicit-booleaness-not-comparison-to-string: "channel_name != ''" can be simplified to "channel_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/roku/helpers.py#L23
- use-implicit-booleaness-not-comparison-to-string: "host != ''" can be simplified to "host", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/config_flow.py#L59
- use-implicit-booleaness-not-comparison-to-string: "host != ''" can be simplified to "host", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/init.py#L168
- use-implicit-booleaness-not-comparison-to-string: "exclude != ''" can be simplified to "exclude", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/init.py#L170
- use-implicit-booleaness-not-comparison-to-string: "part.fstype == ''" can be simplified to "not part.fstype", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/systemmonitor/util.py#L25
- use-implicit-booleaness-not-comparison-to-string: "part.device != ''" can be simplified to "part.device", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/systemmonitor/util.py#L51
- use-implicit-booleaness-not-comparison-to-string: "profile.name != ''" can be simplified to "profile.name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/homematicip_cloud/climate.py#L285
- use-implicit-booleaness-not-comparison-to-string: "appliance_name != ''" can be simplified to "appliance_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/smappee/binary_sensor.py#L116
- use-implicit-booleaness-not-comparison-to-string: "device.ip_address == ''" can be simplified to "not device.ip_address", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/fritz/coordinator.py#L68
- use-implicit-booleaness-not-comparison-to-string: "location == ''" can be simplified to "not location", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/media_source/local_source.py#L135
- unsubscriptable-object: Value 'self.hass.data[DOMAIN]' is unsubscriptable https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/media_source/models.py#L89
- use-implicit-booleaness-not-comparison-to-string: "info.get('vf_internet_key_online_since') != ''" can be simplified to "info.get('vf_internet_key_online_since')", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/button.py#L64
- use-implicit-booleaness-not-comparison-to-string: "info['phone_num1'] != ''" can be simplified to "info['phone_num1']", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/sensor.py#L110
- use-implicit-booleaness-not-comparison-to-string: "info['phone_num2'] != ''" can be simplified to "info['phone_num2']", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/sensor.py#L115
- use-implicit-booleaness-not-comparison-to-string: "self._prefix != ''" can be simplified to "self._prefix", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/elkm1/entity.py#L73
- use-implicit-booleaness-not-comparison-to-string: "parts.path == ''" can be simplified to "not parts.path", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/auth/indieauth.py#L146
- use-implicit-booleaness-not-comparison-to-string: "parts.fragment != ''" can be simplified to "parts.fragment", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/auth/indieauth.py#L174
- use-implicit-booleaness-not-comparison-to-string: "self._components_text != ''" can be simplified to "self._components_text", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/wilight/config_flow.py#L44
- use-implicit-booleaness-not-comparison-to-string: "state['state'] == ''" can be simplified to "not state['state']", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthing/sensor.py#L237
- use-implicit-booleaness-not-comparison-to-string: "value_template.render_with_possible_json_value(content) == ''" can be simplified to "not value_template.render_with_possible_json_value(content)", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dweet/sensor.py#L61
- use-implicit-booleaness-not-comparison-to-string: "chargepoint_name != ''" can be simplified to "chargepoint_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/blue_current/entity.py#L63
- use-implicit-booleaness-not-comparison-to-string: "identifier == ''" can be simplified to "not identifier", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nest/media_source.py#L291
- use-implicit-booleaness-not-comparison-to-string: "val == ''" can be simplified to "not val", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/gtfs/sensor.py#L818
- use-implicit-booleaness-not-comparison-to-string: "tray_state == ''" can be simplified to "not tray_state", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthru/sensor.py#L206
- use-implicit-booleaness-not-comparison-to-string: "tray_state == ''" can be simplified to "not tray_state", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthru/sensor.py#L234
- use-implicit-booleaness-not-comparison-to-string: "self.dev.current_temperature != ''" can be simplified to "self.dev.current_temperature", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/iaqualink/climate.py#L111
- use-implicit-booleaness-not-comparison-to-string: "self.dev.state == ''" can be simplified to "not self.dev.state", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/iaqualink/sensor.py#L53
- use-implicit-booleaness-not-comparison-to-string: "device_config[CONF_NAME] != ''" can be simplified to "device_config[CONF_NAME]", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/lcn/helpers.py#L393
- use-implicit-booleaness-not-comparison-to-string: "device_name == ''" can be simplified to "not device_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/lcn/helpers.py#L399
- use-implicit-booleaness-not-comparison-to-string: "event_type == ''" can be simplified to "not event_type", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/shelly/coordinator.py#L327
- use-implicit-booleaness-not-comparison-to-string: "action == ''" can be simplified to "not action", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dialogflow/init.py#L131
- use-implicit-booleaness-not-comparison-to-string: "k != ''" can be simplified to "k", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/evohome/water_heater.py#L46
- use-implicit-booleaness-not-comparison-to-string: "artist_name != ''" can be simplified to "artist_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/media_player.py#L878
- use-implicit-booleaness-not-comparison-to-string: "artist_name != ''" can be simplified to "artist_name", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/media_player.py#L891
- use-implicit-booleaness-not-comparison-to-string: "search_id == ''" can be simplified to "not search_id", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/browse_media.py#L63
- use-implicit-booleaness-not-comparison-to-string: "data[CONF_NAME] == ''" can be simplified to "not data[CONF_NAME]", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/harmony/util.py#L23
- unsupported-assignment-operation: 'self.hass.data[DATA_LAST_WAKE_UP]' does not support item assignment https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/assist_pipeline/pipeline.py#L770
- unsupported-assignment-operation: 'self.run.hass.data[DATA_LAST_WAKE_UP]' does not support item assignment https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/assist_pipeline/pipeline.py#L1377
- use-implicit-booleaness-not-comparison-to-string: "filter_product == ''" can be simplified to "not filter_product", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/trafikverket_train/config_flow.py#L197
- use-implicit-booleaness-not-comparison-to-string: "_filter == ''" can be simplified to "not _filter", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/trafikverket_train/config_flow.py#L251
- use-implicit-booleaness-not-comparison-to-string: "mac == ''" can be simplified to "not mac", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/services.py#L67
- use-implicit-booleaness-not-comparison-to-string: "client.access_point_mac != ''" can be simplified to "client.access_point_mac", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L133
- use-implicit-booleaness-not-comparison-to-string: "client.access_point_mac == ''" can be simplified to "not client.access_point_mac", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L136
- use-implicit-booleaness-not-comparison-to-string: "hub.api.devices[obj_id].system_stats[stat_index] != ''" can be simplified to "hub.api.devices[obj_id].system_stats[stat_index]", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L189
- use-implicit-booleaness-not-comparison-to-string: "latest_version != ''" can be simplified to "latest_version", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/mqtt/update.py#L202
- use-implicit-booleaness-not-comparison-to-string: "payload == ''" can be simplified to "not payload", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/mqtt/sensor.py#L264
- use-implicit-booleaness-not-comparison-to-string: "raw_state == ''" can be simplified to "not raw_state", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/fitbit/sensor.py#L96
- use-implicit-booleaness-not-comparison-to-string: "label == ''" can be simplified to "not label", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/yamaha_musiccast/media_player.py#L167
- use-implicit-booleaness-not-comparison-to-string: "media_content_id == ''" can be simplified to "not media_content_id", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/philips_js/media_player.py#L390
- use-implicit-booleaness-not-comparison-to-string: "media_content.id_or_path == ''" can be simplified to "not media_content.id_or_path", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/forked_daapd/browse_media.py#L171
- use-implicit-booleaness-not-comparison-to-string: "option == ''" can be simplified to "not option", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/overkiz/select.py#L66
- use-implicit-booleaness-not-comparison-to-string: "code == ''" can be simplified to "not code", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/elmax/alarm_control_panel.py#L107
- use-implicit-booleaness-not-comparison-to-string: "getattr(coordinator.data[config_entry.data['garage_name']], info_type) != ''" can be simplified to "getattr(coordinator.data[config_entry.data['garage_name']], info_type)", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/garages_amsterdam/sensor.py#L33
- use-implicit-booleaness-not-comparison-to-string: "self.thermostat['equipmentStatus'] == ''" can be simplified to "not self.thermostat['equipmentStatus']", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/ecobee/climate.py#L535
- use-implicit-booleaness-not-comparison-to-string: "name.strip() != ''" can be simplified to "name.strip()", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/ws66i/config_flow.py#L60
- unsupported-assignment-operation: 'self.hass.data[DOMAIN]' does not support item assignment https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/system_health/init.py#L228
- use-implicit-booleaness-not-comparison-to-string: "device_instance.binary_sensor_property[element_uid].sub_type != ''" can be simplified to "device_instance.binary_sensor_property[element_uid].sub_type", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/devolo_home_control/binary_sensor.py#L84
- use-implicit-booleaness-not-comparison-to-string: "state.state == ''" can be simplified to "not state.state", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/apache_kafka/init.py#L122
- use-implicit-booleaness-not-comparison-to-string: "att == ''" can be simplified to "not att", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/hdmi_cec/init.py#L234
- use-implicit-booleaness-not-comparison-to-string: "volume != ''" can be simplified to "volume", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/volumio/media_player.py#L141
- use-implicit-booleaness-not-comparison-to-string: "name.strip() != ''" can be simplified to "name.strip()", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/monoprice/config_flow.py#L59
- use-implicit-booleaness-not-comparison-to-string: "message.payload == ''" can be simplified to "not message.payload", if it is strictly a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dsmr_reader/sensor.py#L49
The following messages are no longer emitted:
- use-implicit-booleaness-not-comparison-to-string: "name.strip() != ''" can be simplified to "name.strip()", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/ws66i/config_flow.py#L60
- use-implicit-booleaness-not-comparison-to-string: "channel_name != ''" can be simplified to "channel_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/roku/helpers.py#L23
- use-implicit-booleaness-not-comparison-to-string: "info['phone_num1'] != ''" can be simplified to "info['phone_num1']", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/sensor.py#L110
- use-implicit-booleaness-not-comparison-to-string: "info['phone_num2'] != ''" can be simplified to "info['phone_num2']", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/sensor.py#L115
- use-implicit-booleaness-not-comparison-to-string: "info.get('vf_internet_key_online_since') != ''" can be simplified to "info.get('vf_internet_key_online_since')", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/vodafone_station/button.py#L64
- use-implicit-booleaness-not-comparison-to-string: "self.thermostat['equipmentStatus'] == ''" can be simplified to "not self.thermostat['equipmentStatus']", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/ecobee/climate.py#L535
- use-implicit-booleaness-not-comparison-to-string: "raw_state == ''" can be simplified to "not raw_state", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/fitbit/sensor.py#L96
- use-implicit-booleaness-not-comparison-to-string: "media_content_id == ''" can be simplified to "not media_content_id", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/philips_js/media_player.py#L390
- use-implicit-booleaness-not-comparison-to-string: "value_template.render_with_possible_json_value(content) == ''" can be simplified to "not value_template.render_with_possible_json_value(content)", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dweet/sensor.py#L61
- use-implicit-booleaness-not-comparison-to-string: "location == ''" can be simplified to "not location", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/media_source/local_source.py#L135
- use-implicit-booleaness-not-comparison-to-string: "appliance_name != ''" can be simplified to "appliance_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/smappee/binary_sensor.py#L116
- use-implicit-booleaness-not-comparison-to-string: "val == ''" can be simplified to "not val", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/gtfs/sensor.py#L818
- use-implicit-booleaness-not-comparison-to-string: "device_config[CONF_NAME] != ''" can be simplified to "device_config[CONF_NAME]", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/lcn/helpers.py#L393
- use-implicit-booleaness-not-comparison-to-string: "device_name == ''" can be simplified to "not device_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/lcn/helpers.py#L399
- use-implicit-booleaness-not-comparison-to-string: "message.payload == ''" can be simplified to "not message.payload", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dsmr_reader/sensor.py#L49
- use-implicit-booleaness-not-comparison-to-string: "att == ''" can be simplified to "not att", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/hdmi_cec/init.py#L234
- use-implicit-booleaness-not-comparison-to-string: "device.ip_address == ''" can be simplified to "not device.ip_address", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/fritz/coordinator.py#L68
- use-implicit-booleaness-not-comparison-to-string: "state.state == ''" can be simplified to "not state.state", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/apache_kafka/init.py#L122
- use-implicit-booleaness-not-comparison-to-string: "self._components_text != ''" can be simplified to "self._components_text", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/wilight/config_flow.py#L44
- use-implicit-booleaness-not-comparison-to-string: "label == ''" can be simplified to "not label", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/yamaha_musiccast/media_player.py#L167
- use-implicit-booleaness-not-comparison-to-string: "profile.name != ''" can be simplified to "profile.name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/homematicip_cloud/climate.py#L285
- use-implicit-booleaness-not-comparison-to-string: "media_content.id_or_path == ''" can be simplified to "not media_content.id_or_path", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/forked_daapd/browse_media.py#L171
- use-implicit-booleaness-not-comparison-to-string: "event_type == ''" can be simplified to "not event_type", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/shelly/coordinator.py#L327
- use-implicit-booleaness-not-comparison-to-string: "self._prefix != ''" can be simplified to "self._prefix", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/elkm1/entity.py#L73
- use-implicit-booleaness-not-comparison-to-string: "getattr(coordinator.data[config_entry.data['garage_name']], info_type) != ''" can be simplified to "getattr(coordinator.data[config_entry.data['garage_name']], info_type)", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/garages_amsterdam/sensor.py#L33
- use-implicit-booleaness-not-comparison-to-string: "host != ''" can be simplified to "host", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/config_flow.py#L59
- use-implicit-booleaness-not-comparison-to-string: "host != ''" can be simplified to "host", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/init.py#L168
- use-implicit-booleaness-not-comparison-to-string: "exclude != ''" can be simplified to "exclude", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nmap_tracker/init.py#L170
- use-implicit-booleaness-not-comparison-to-string: "name.strip() != ''" can be simplified to "name.strip()", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/monoprice/config_flow.py#L59
- use-implicit-booleaness-not-comparison-to-string: "tray_state == ''" can be simplified to "not tray_state", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthru/sensor.py#L206
- use-implicit-booleaness-not-comparison-to-string: "tray_state == ''" can be simplified to "not tray_state", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthru/sensor.py#L234
- use-implicit-booleaness-not-comparison-to-string: "chargepoint_name != ''" can be simplified to "chargepoint_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/blue_current/entity.py#L63
- use-implicit-booleaness-not-comparison-to-string: "client.access_point_mac != ''" can be simplified to "client.access_point_mac", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L133
- use-implicit-booleaness-not-comparison-to-string: "client.access_point_mac == ''" can be simplified to "not client.access_point_mac", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L136
- use-implicit-booleaness-not-comparison-to-string: "hub.api.devices[obj_id].system_stats[stat_index] != ''" can be simplified to "hub.api.devices[obj_id].system_stats[stat_index]", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/sensor.py#L189
- use-implicit-booleaness-not-comparison-to-string: "mac == ''" can be simplified to "not mac", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/unifi/services.py#L67
- use-implicit-booleaness-not-comparison-to-string: "self.dev.state == ''" can be simplified to "not self.dev.state", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/iaqualink/sensor.py#L53
- use-implicit-booleaness-not-comparison-to-string: "self.dev.current_temperature != ''" can be simplified to "self.dev.current_temperature", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/iaqualink/climate.py#L111
- use-implicit-booleaness-not-comparison-to-string: "part.fstype == ''" can be simplified to "not part.fstype", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/systemmonitor/util.py#L25
- use-implicit-booleaness-not-comparison-to-string: "part.device != ''" can be simplified to "part.device", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/systemmonitor/util.py#L51
- use-implicit-booleaness-not-comparison-to-string: "payload == ''" can be simplified to "not payload", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/mqtt/sensor.py#L264
- use-implicit-booleaness-not-comparison-to-string: "latest_version != ''" can be simplified to "latest_version", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/mqtt/update.py#L202
- use-implicit-booleaness-not-comparison-to-string: "identifier == ''" can be simplified to "not identifier", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/nest/media_source.py#L291
- use-implicit-booleaness-not-comparison-to-string: "code == ''" can be simplified to "not code", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/elmax/alarm_control_panel.py#L107
- use-implicit-booleaness-not-comparison-to-string: "option == ''" can be simplified to "not option", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/overkiz/select.py#L66
- use-implicit-booleaness-not-comparison-to-string: "device_instance.binary_sensor_property[element_uid].sub_type != ''" can be simplified to "device_instance.binary_sensor_property[element_uid].sub_type", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/devolo_home_control/binary_sensor.py#L84
- use-implicit-booleaness-not-comparison-to-string: "search_id == ''" can be simplified to "not search_id", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/browse_media.py#L63
- use-implicit-booleaness-not-comparison-to-string: "artist_name != ''" can be simplified to "artist_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/media_player.py#L878
- use-implicit-booleaness-not-comparison-to-string: "artist_name != ''" can be simplified to "artist_name", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/kodi/media_player.py#L891
- use-implicit-booleaness-not-comparison-to-string: "filter_product == ''" can be simplified to "not filter_product", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/trafikverket_train/config_flow.py#L197
- use-implicit-booleaness-not-comparison-to-string: "_filter == ''" can be simplified to "not _filter", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/trafikverket_train/config_flow.py#L251
- use-implicit-booleaness-not-comparison-to-string: "state['state'] == ''" can be simplified to "not state['state']", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/syncthing/sensor.py#L237
- use-implicit-booleaness-not-comparison-to-string: "k != ''" can be simplified to "k", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/evohome/water_heater.py#L46
- use-implicit-booleaness-not-comparison-to-string: "parts.path == ''" can be simplified to "not parts.path", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/auth/indieauth.py#L146
- use-implicit-booleaness-not-comparison-to-string: "parts.fragment != ''" can be simplified to "parts.fragment", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/auth/indieauth.py#L174
- use-implicit-booleaness-not-comparison-to-string: "data[CONF_NAME] == ''" can be simplified to "not data[CONF_NAME]", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/harmony/util.py#L23
- use-implicit-booleaness-not-comparison-to-string: "volume != ''" can be simplified to "volume", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/volumio/media_player.py#L141
- use-implicit-booleaness-not-comparison-to-string: "action == ''" can be simplified to "not action", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/components/dialogflow/init.py#L131
- use-implicit-booleaness-not-comparison-to-string: "self.DOMAIN == ''" can be simplified to "not self.DOMAIN", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/config_entry_oauth2_flow.py#L239
- use-implicit-booleaness-not-comparison-to-string: "suggested_area != ''" can be simplified to "suggested_area", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/device_registry.py#L940
- use-implicit-booleaness-not-comparison-to-string: "value == ''" can be simplified to "not value", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/helpers/config_validation.py#L264
- use-implicit-booleaness-not-comparison-to-string: "text == ''" can be simplified to "not text", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/util/init.py#L43
- use-implicit-booleaness-not-comparison-to-string: "slug == ''" can be simplified to "not slug", if it is striclty a string, as an empty string is falsey https://github.com/home-assistant/core/blob/12dbabb849692577beebdb5024fa0f8f5572e4bb/homeassistant/util/init.py#L46
Effect on poetry-core: The following messages are now emitted:
- use-implicit-booleaness-not-comparison-to-string: "op == ''" can be simplified to "not op", if it is strictly a string, as an empty string is falsey https://github.com/python-poetry/poetry-core/blob/a2b6f0015c4a721575488bbe8c0a42c6b16f617e/src/poetry/core/packages/dependency.py#L189
The following messages are no longer emitted:
- use-implicit-booleaness-not-comparison-to-string: "op == ''" can be simplified to "not op", if it is striclty a string, as an empty string is falsey https://github.com/python-poetry/poetry-core/blob/a2b6f0015c4a721575488bbe8c0a42c6b16f617e/src/poetry/core/packages/dependency.py#L189
Effect on black: The following messages are now emitted:
- use-implicit-booleaness-not-comparison-to-string: "result[-1] == ''" can be simplified to "not result[-1]", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/output.py#L70
- use-implicit-booleaness-not-comparison-to-string: "LL[string_idx - 1].value == ''" can be simplified to "not LL[string_idx - 1].value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/trans.py#L1209
- use-implicit-booleaness-not-comparison-to-string: "N.value == ''" can be simplified to "not N.value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/trans.py#L1241
- use-implicit-booleaness-not-comparison-to-string: "first.value == ''" can be simplified to "not first.value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L847
- use-implicit-booleaness-not-comparison-to-string: "last.value == ''" can be simplified to "not last.value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L850
- use-implicit-booleaness-not-comparison-to-string: "leaf.value == ''" can be simplified to "not leaf.value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L859
- use-implicit-booleaness-not-comparison-to-string: "leaf.value == ''" can be simplified to "not leaf.value", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L863
- use-implicit-booleaness-not-comparison-to-string: "prefix != ''" can be simplified to "prefix", if it is strictly a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/blib2to3/pgen2/tokenize.py#L466
The following messages are no longer emitted:
- use-implicit-booleaness-not-comparison-to-string: "result[-1] == ''" can be simplified to "not result[-1]", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/output.py#L70
- use-implicit-booleaness-not-comparison-to-string: "LL[string_idx - 1].value == ''" can be simplified to "not LL[string_idx - 1].value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/trans.py#L1209
- use-implicit-booleaness-not-comparison-to-string: "N.value == ''" can be simplified to "not N.value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/trans.py#L1241
- use-implicit-booleaness-not-comparison-to-string: "first.value == ''" can be simplified to "not first.value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L847
- use-implicit-booleaness-not-comparison-to-string: "last.value == ''" can be simplified to "not last.value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L850
- use-implicit-booleaness-not-comparison-to-string: "leaf.value == ''" can be simplified to "not leaf.value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L859
- use-implicit-booleaness-not-comparison-to-string: "leaf.value == ''" can be simplified to "not leaf.value", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/black/nodes.py#L863
- use-implicit-booleaness-not-comparison-to-string: "prefix != ''" can be simplified to "prefix", if it is striclty a string, as an empty string is falsey https://github.com/psf/black/blob/bbfdba3a5e4f0b3105ec9526c51e769866b28f1f/src/blib2to3/pgen2/tokenize.py#L466
Effect on music21: The following messages are now emitted:
- use-implicit-booleaness-not-comparison-to-string: "self.stringRep != ''" can be simplified to "self.stringRep", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/tinyNotation.py#L1199
- use-implicit-booleaness-not-comparison-to-string: "orGroup == ''" can be simplified to "not orGroup", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/sieve.py#L1589
- use-implicit-booleaness-not-comparison-to-string: "thisRepr != ''" can be simplified to "thisRepr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/tablature.py#L106
- use-implicit-booleaness-not-comparison-to-string: "num == ''" can be simplified to "not num", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/pitch.py#L902
- use-implicit-booleaness-not-comparison-to-string: "tupletStr != ''" can be simplified to "tupletStr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/duration.py#L2803
- use-implicit-booleaness-not-comparison-to-string: "tupletStr != ''" can be simplified to "tupletStr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/duration.py#L2805
- use-implicit-booleaness-not-comparison-to-string: "self.size == ''" can be simplified to "not self.size", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/expressions.py#L2409
- use-implicit-booleaness-not-comparison-to-string: "self.chordKind != ''" can be simplified to "self.chordKind", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/harmony.py#L1728
- use-implicit-booleaness-not-comparison-to-string: "alteration != ''" can be simplified to "alteration", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/harmony.py#L2058
- use-implicit-booleaness-not-comparison-to-string: "lyr != ''" can be simplified to "lyr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/text.py#L156
- use-implicit-booleaness-not-comparison-to-string: "excerpt == ''" can be simplified to "not excerpt", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/text.py#L498
- use-implicit-booleaness-not-comparison-to-string: "prefix != ''" can be simplified to "prefix", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/roman.py#L369
- use-implicit-booleaness-not-comparison-to-string: "sub == ''" can be simplified to "not sub", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/configure.py#L83
- use-implicit-booleaness-not-comparison-to-string: "line == ''" can be simplified to "not line", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/configure.py#L95
- use-implicit-booleaness-not-comparison-to-string: "raw == ''" can be simplified to "not raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/configure.py#L656
- use-implicit-booleaness-not-comparison-to-string: "raw == ''" can be simplified to "not raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/configure.py#L935
- use-implicit-booleaness-not-comparison-to-string: "environPath == ''" can be simplified to "not environPath", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/configure.py#L1106
- use-implicit-booleaness-not-comparison-to-string: "value == ''" can be simplified to "not value", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/spanner.py#L1571
- use-implicit-booleaness-not-comparison-to-string: "value != ''" can be simplified to "value", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/environment.py#L229
- use-implicit-booleaness-not-comparison-to-string: "value == ''" can be simplified to "not value", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/environment.py#L254
- use-implicit-booleaness-not-comparison-to-string: "el.text == ''" can be simplified to "not el.text", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/lily/translate.py#L795
- use-implicit-booleaness-not-comparison-to-string: "moduleResponse.moduleName == ''" can be simplified to "not moduleResponse.moduleName", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/test/multiprocessTest.py#L257
- use-implicit-booleaness-not-comparison-to-string: "data == ''" can be simplified to "not data", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L389
- use-implicit-booleaness-not-comparison-to-string: "data[16:].strip() != ''" can be simplified to "data[16:].strip()", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L660
- use-implicit-booleaness-not-comparison-to-string: "data[8:].strip() != ''" can be simplified to "data[8:].strip()", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L685
- use-implicit-booleaness-not-comparison-to-string: "mNumber != ''" can be simplified to "mNumber", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L694
- use-implicit-booleaness-not-comparison-to-string: "line.strip() == ''" can be simplified to "not line.strip()", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L810
- use-implicit-booleaness-not-comparison-to-string: "alphas == ''" can be simplified to "not alphas", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L933
- use-implicit-booleaness-not-comparison-to-string: "entry.strip() != ''" can be simplified to "entry.strip()", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1018
- use-implicit-booleaness-not-comparison-to-string: "raw == ''" can be simplified to "not raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1178
- use-implicit-booleaness-not-comparison-to-string: "raw != ''" can be simplified to "raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1207
- use-implicit-booleaness-not-comparison-to-string: "raw == ''" can be simplified to "not raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1209
- use-implicit-booleaness-not-comparison-to-string: "raw != ''" can be simplified to "raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1213
- use-implicit-booleaness-not-comparison-to-string: "raw == ''" can be simplified to "not raw", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1294
- use-implicit-booleaness-not-comparison-to-string: "numStr == ''" can be simplified to "not numStr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1650
- use-implicit-booleaness-not-comparison-to-string: "numStr != ''" can be simplified to "numStr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/musedata/init.py#L1663
- use-implicit-booleaness-not-comparison-to-string: "figureString != ''" can be simplified to "figureString", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/figuredBass/harmony.py#L74
- use-implicit-booleaness-not-comparison-to-string: "line == ''" can be simplified to "not line", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/humdrum/spineParser.py#L396
- use-implicit-booleaness-not-comparison-to-string: "thisObject.comment == ''" can be simplified to "not thisObject.comment", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/humdrum/spineParser.py#L1328
- use-implicit-booleaness-not-comparison-to-string: "thisObject.comment == ''" can be simplified to "not thisObject.comment", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/humdrum/spineParser.py#L1460
- redefined-variable-type: Redefinition of thisObject type from music21.note.Note to music21.note.GeneralNote https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/humdrum/spineParser.py#L2375
- use-implicit-booleaness-not-comparison-to-string: "stringRemain == ''" can be simplified to "not stringRemain", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L546
- use-implicit-booleaness-not-comparison-to-string: "splitTuplet[1] != ''" can be simplified to "splitTuplet[1]", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L1083
- use-implicit-booleaness-not-comparison-to-string: "splitTuplet[2] != ''" can be simplified to "splitTuplet[2]", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L1154
- use-implicit-booleaness-not-comparison-to-string: "accString != ''" can be simplified to "accString", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L1544
- use-implicit-booleaness-not-comparison-to-string: "numStr == ''" can be simplified to "not numStr", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L1652
- use-implicit-booleaness-not-comparison-to-string: "activeChordSymbol != ''" can be simplified to "activeChordSymbol", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L2372
- use-implicit-booleaness-not-comparison-to-string: "activeChordSymbol != ''" can be simplified to "activeChordSymbol", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/abcFormat/init.py#L2476
- use-implicit-booleaness-not-comparison-to-string: "brailleSig != ''" can be simplified to "brailleSig", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/braille/segment.py#L914
- use-implicit-booleaness-not-comparison-to-string: "bText != ''" can be simplified to "bText", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/braille/lookup.py#L59
- use-implicit-booleaness-not-comparison-to-string: "modifier != ''" can be simplified to "modifier", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/graph/utilities.py#L101
- use-implicit-booleaness-not-comparison-to-string: "numSuffix == ''" can be simplified to "not numSuffix", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/stream/base.py#L9003
- use-implicit-booleaness-not-comparison-to-string: "text == ''" can be simplified to "not text", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/capella/fromCapellaXML.py#L658
- use-implicit-booleaness-not-comparison-to-string: "content != ''" can be simplified to "content", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/clercqTemperley.py#L875
- use-implicit-booleaness-not-comparison-to-string: "sep != ''" can be simplified to "sep", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/clercqTemperley.py#L875
- use-implicit-booleaness-not-comparison-to-string: "y == ''" can be simplified to "not y", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/clercqTemperley.py#L912
- use-implicit-booleaness-not-comparison-to-string: "data == ''" can be simplified to "not data", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/translate.py#L656
- use-implicit-booleaness-not-comparison-to-string: "rl == ''" can be simplified to "not rl", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/translate.py#L1005
- use-implicit-booleaness-not-comparison-to-string: "line == ''" can be simplified to "not line", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/rtObjects.py#L1133
- use-implicit-booleaness-not-comparison-to-string: "line == ''" can be simplified to "not line", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/rtObjects.py#L1153
- use-implicit-booleaness-not-comparison-to-string: "word == ''" can be simplified to "not word", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/romanText/rtObjects.py#L1236
- use-implicit-booleaness-not-comparison-to-string: "d != ''" can be simplified to "d", if it is strictly a string, as an empty string is falsey https://github.com/cuthbertLab/music21/blob/cfabad142f8d42d94fbfeff497285c7bd4be4db1/music21/noteworthy/binaryTranslate.py#L624
- use-implicit-booleaness-not-comparison-to-string: *"self.alterationStr == ''" can be simplified to "not self.alterationStr", if it is strictly ...
This comment was truncated because GitHub allows only 65536 characters in a comment.
This comment was generated for commit 96592c916290f26011da98b65b7f26016b625ccb
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 49bf1a73856596deeb1846a4293f83928e02627c
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉
This comment was generated for commit 6584761012bb49b4275b8d1bef812c07331bfd61