File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 https://circuitpython.org/downloads
2727"""
2828import math
29- import os
30- import toml
3129import socket as pool
3230import ssl
3331import typing # pylint: disable=unused-import
32+ import toml
3433from micropython import const
3534import adafruit_requests
3635from fake_bme280 .protocol import I2C_Impl , SPI_Impl
7776_BME280_REGISTER_HUMIDDATA = const (0xFD )
7877
7978# Load the settings.toml file
80- config = toml .load ("settings.toml" )
79+ toml_config = toml .load ("settings.toml" )
8180
8281# OpenWeatherMap API
8382# GET weather data for a specific location
8483DATA_SOURCE = (
8584 "http://api.openweathermap.org/data/2.5/weather?q="
86- + config ["openweather_location" ]
85+ + toml_config ["openweather_location" ]
8786 + "&units="
88- + config ["openweather_units" ]
87+ + toml_config ["openweather_units" ]
8988 + "&mode=json"
9089 + "&appid="
91- + config ["openweather_token" ]
90+ + toml_config ["openweather_token" ]
9291)
9392
9493
Original file line number Diff line number Diff line change 1010class I2C_Impl :
1111 "Protocol implementation for the I2C bus."
1212
13- # pylint: disable=too-few-public-methods
13+ # pylint: disable=too-few-public-methods, unused-argument, unused-import
1414 def __init__ (self , i2c : I2C , address : int ) -> None :
1515 from adafruit_bus_device import ( # pylint: disable=import-outside-toplevel
1616 i2c_device ,
You can’t perform that action at this time.
0 commit comments