limit*. Hence, it seems more relevant for describing the small-scale structure probed by thin light beams.

In this article, we revisit and update the studies of Refs. [@Kan69; @DR74] within the paradigm of modern cosmology. For that purpose, we first provide a comprehensive study of light propagation in the same class of Swiss-cheese models, including the cosmological constant. By generating mock Hubble diagrams, we then show that the inhomogeneities induce a significant bias in the apparent luminosity-redshift relation, which affects the determination of the cosmological parameters. As we shall see, the effect increases with the fraction of clustered matter but decreases with $\Lambda$. For a universe apparently dominated by dark energy, the difference turns out to be small.

The article is organized as follows. Section \[sec:Swiss-cheese\] describes the construction and mathematical properties of the Swiss-cheese model. In Sec. \[sec:geometric\_optics\], we summarize the laws of light propagation, and introduce a new tool to deal with a patchwork of spacetimes, based on matrix multiplications. In Sec. \[sec:resolution\], we apply the laws introduced in Sec. \[sec:geometric\_optics\] to Swiss-cheese models and solve the associated equations. The results enable us to investigate the effect of one hole (Sec. \[sec:results\_one\_hole\]) and of many holes (Sec. \[sec:results\_several\_holes\]) 